Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Getting cords

  1. #1
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default Getting cords

    I'm using script.aculo.us draggables, and how would I go about finding the cords for a dragged box. I've searched and found two threads about this topic but they don't work/I don't understand them.

    If you know how to find the cords, please post. +rep

  2. #2
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Code:
    var x;
    var y;
    var element;
    
    element = $('elementName');
    
    x = element.offsetLeft;
    y = element.offsetTop;
    I think?
    Last edited by Dentafrice; 27-10-2008 at 09:43 PM.

  3. #3
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    The can I just save the cords using a cookie?

  4. #4
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    bumppp

    Edited by Yoshimitsui (Super Moderator): Please do not multiple post.
    Last edited by Yoshimitsui; 31-10-2008 at 03:58 PM.

  5. #5
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Why would you want to save them in a cookie for?

    What are you trying to do? :s

  6. #6
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    I want it so a user can go on this page, drag boxes where they want to, then save it. (this'll be their profile page)

  7. #7
    Join Date
    Apr 2008
    Location
    Derby
    Posts
    4,668
    Tokens
    262

    Latest Awards:

    Default

    Quote Originally Posted by BOX! View Post
    I want it so a user can go on this page, drag boxes where they want to, then save it. (this'll be their profile page)
    Then they'll empy their cookies and it'll all be gone?
    Back for a while

  8. #8
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Quote Originally Posted by BOX! View Post
    I want it so a user can go on this page, drag boxes where they want to, then save it. (this'll be their profile page)
    Well save it in MySQL.. because when a user clears his cookies.. everything saved will be gone..

  9. #9
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    Mkay;

    I still don't know how to physically view the cords though (I know how to find them)

  10. #10
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    90

    Latest Awards:

    Default

    Code:
    document.write(x)
    document.write(y)
    Presuming you have set the variables like shown above.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •