PDA

View Full Version : Posting a javascript value



Eclyps19
02-11-2006, 08:53 PM
how the hell do i post a javascript value? Someone told me it was something like this.


<form name="form1" method="post" action="profile03_update.asp?promiscuity=document.getElementById(level)">

where level is the javascript variable. I think I am close but... i need some assistance. Thanks!

Twey
02-11-2006, 08:58 PM
Lol, no. You edit the value of a hidden input (<input type="hidden">) then submit its form.

Eclyps19
02-11-2006, 09:33 PM
crap i'm such a loser!

can you gimme an example? I'm still not 100% getting how I get the javascript value in there. Thanks twey =)

Twey
02-11-2006, 09:42 PM
<form id="myform" action="profile03_update.asp" method="post" onsubmit="elements['promiscuity'].value = document.getElementById('level').value;return true;">
<input type="hidden" id="promiscuity" />
<input type="submit" value="Go!" />
</form>

Eclyps19
02-11-2006, 09:49 PM
thanks! Much clearer now. =D!!!!!! :) :p :D :o you rock!