vForums Support Banner


Visit Base Classics - Gaming Chairs

 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: Reposition Element - View Topic
Topic Rating: *****
Printable View
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 34
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Reposition Element (11th Jan 10 at 5:21pm UTC)
Resolved
Code:
 
  1. <script>
  2. function RePos(WinID,X,Y){
  3. get(WinID,'id').style.top = Y;
  4. get(WinID,'id').style.left = X;
  5. }
  6. </script>
 


I call it using onclick="RePos('the-id',50,50);"

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Reposition Element (11th Jan 10 at 5:49pm UTC)
You'd need to give the element some form of positioning - absolute or fixed etc... {Smile}
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 34
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Reposition Element (11th Jan 10 at 6:10pm UTC)
It has fixed

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
dog199200
Guest
Re: Reposition Element (11th Jan 10 at 6:25pm UTC)
i'm assume by the positioning is in the onclick feature?

the 50,50 ?
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Reposition Element (11th Jan 10 at 6:28pm UTC)
 
It has fixed

Is it working?
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 34
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Reposition Element (11th Jan 10 at 6:37pm UTC)
The code isn't

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Reposition Element (11th Jan 10 at 6:45pm UTC)
What's the forum link so that I can take a look. {Smile}
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 34
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Reposition Element (11th Jan 10 at 6:50pm UTC)
The Final Anime Hideout (In my sig)

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Reposition Element (11th Jan 10 at 7:09pm UTC)
You don't actually need the code that you have in there at the moment from the looks of it,it doesn't do anything! O.o
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 34
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Reposition Element (11th Jan 10 at 7:10pm UTC)
I have a code that makes some spans draggable, I want this code to move them back

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Reposition Element (11th Jan 10 at 7:20pm UTC)
Code:
 
  1. <script>
  2. function RePos(WinID,X,Y){
  3.      get(WinID,'id').style.top = Y;
  4.      get(WinID,'id').style.left = X;
  5. }
  6. </script>
  7.  
  8. <div id = 'x' onclick = "RePos('x', '500px', '500px');" style = 'position: fixed; padding: 50px; border: 1px solid #000000; background: #800000; color: #FFFFFF;'>
  9. This is a repositionable box!
  10. </div>
 



That code works fine. {Smile}
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 34
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Reposition Element (11th Jan 10 at 7:23pm UTC)
Maybe I just called it wrong

Edit: Yep, I did call it wrong with the X and Y, works now

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Reposition Element (11th Jan 10 at 7:25pm UTC)
You'll need to include the 'numberpx' in it. Without the px declaration it won't recognise what you want to do. At least my testing revealed that. You can either throw it into the function, or the call. {Smile}
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 34
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Reposition Element (11th Jan 10 at 8:02pm UTC)
It works really good now

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Reposition Element (11th Jan 10 at 8:08pm UTC)
Good to know! {Smile}
 Printable View

All times are GMT+0 :: The current time is 10:29am
Page generated in 1.2275 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums