View Full Version : Posting a javascript value

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!

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

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 =)

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!" />

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