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!


Results 1 to 3 of 3

Thread: [JS] Problem

  1. #1
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default [JS] Problem

    I am a noob when it comes to JS but I had a play around with AJAX with much help from carls tutorial and w3schools. This is most likely the very basics of JS but I dont know it

    username and post are both JS vars from a function, how would I go to the var rather than "username"

    xmlhttp.open('POST', 'rep.php?u=username&p=post', false);


    Like if it worked like PHP I could put something like this but its obv. not the same as php.

    xmlhttp.open('POST', 'rep.php?u='.$username.'&p='.$post, false);


    Thanks

  2. #2
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Try:

    xmlhttp.open('POST', 'rep.php?u='+username+'&p=post', false);

  3. #3
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    Thank you Simon x] I am going to work on my JS :p

Posting Permissions

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