Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2007
    Location
    Luton, England
    Posts
    1,548
    Tokens
    388
    Habbo
    DeejayMachoo

    Latest Awards:

    Default js help [maniacs homes]

    hey ive basically finished my homes system buy i just have 1 problem and cant find a solution's any where basically adding an element to a page without refreshing it

    e.g

    addsticker('484', 'habbostickerclass');

    and that adds it to the page?

    any ideas?

    EDIT: Also posted in coding community
    Last edited by DeejayMachoo$; 23-06-2008 at 06:41 PM.


  2. #2
    Join Date
    Mar 2007
    Location
    Kent
    Posts
    11,415
    Tokens
    787

    Latest Awards:

    Default

    o hia matt try the Coding Community eh?

  3. #3
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    You need to use ajax, so that when you do addsticker('484', 'habbostickerclass') it sends the request to something like addsticker.php?stickerid=....&stickername=... then use PHP to add it to a database.
    Lets set the stage on fire, and hollywood will be jealous.

  4. #4
    Join Date
    Oct 2007
    Location
    Luton, England
    Posts
    1,548
    Tokens
    388
    Habbo
    DeejayMachoo

    Latest Awards:

    Default

    ive allredy got it in the db i just need the js to create a div with the id and the class in the command


  5. #5
    Join Date
    Nov 2007
    Location
    UK
    Posts
    532
    Tokens
    0

    Default

    Quote Originally Posted by Oojamaflip View Post
    ive allredy got it in the db i just need the js to create a div with the id and the class in the command

    Completly off topic:

    When will they be finished?

  6. #6
    Join Date
    Oct 2007
    Location
    Luton, England
    Posts
    1,548
    Tokens
    388
    Habbo
    DeejayMachoo

    Latest Awards:

    Default

    Quote Originally Posted by habtasia View Post
    Completly off topic:

    When will they be finished?
    once this is finished i need to do groups then finished


  7. #7
    Join Date
    Nov 2007
    Location
    UK
    Posts
    532
    Tokens
    0

    Default

    Quote Originally Posted by Oojamaflip View Post
    once this is finished i need to do groups then finished

    Thanks

  8. #8
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    Probably the first free legal released homes script.

  9. #9
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    How did you do it, seeing as you have another problem?

  10. #10
    Join Date
    Oct 2007
    Location
    Luton, England
    Posts
    1,548
    Tokens
    388
    Habbo
    DeejayMachoo

    Latest Awards:

    Default

    function addSticker(id, class) {
    var ni = document.getElementById('playground');
    var addsticker = document.createElement('div');
    addsticker.setAttribute('id',id);
    addsticker.setAttribute('class',class);
    ni.appendChild(addsticker);
    }


Posting Permissions

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