View Full Version : js help [maniacs homes]
DeejayMachoo$
23-06-2008, 06:30 PM
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 :)
today
23-06-2008, 06:30 PM
o hia matt try the Coding Community eh?
Decode
23-06-2008, 07:00 PM
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.
DeejayMachoo$
23-06-2008, 07:03 PM
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 ;(
habtasia
23-06-2008, 07:22 PM
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?
DeejayMachoo$
23-06-2008, 07:25 PM
Completly off topic:
When will they be finished?
once this is finished i need to do groups then finished :)
habtasia
23-06-2008, 07:26 PM
once this is finished i need to do groups then finished :)
Thanks :D
Independent
23-06-2008, 08:31 PM
Probably the first free legal released homes script.
Independent
24-06-2008, 04:58 PM
How did you do it, seeing as you have another problem?
DeejayMachoo$
24-06-2008, 05:14 PM
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);
}
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.