Checkbox without submit
Aug 31, 2010 20:18:47 GMT -5
Post by marcioc on Aug 31, 2010 20:18:47 GMT -5
I need help from the javascript experts. I am very close to develop a checkbox without submit. It is missing a final detail.
I cannot get the value of the box checked after it has been submited.
I cannot get the value of the box checked after it has been submited.
cls link #q,".",[test]
html "<script type=""text/javascript"">
var a=null;
function inform(form,ref,v) {
var timer;
var as = document.getElementsByTagName('A');
for (var i = 0; i < as.length; i++) {
if (as.firstChild.data == ref)
{
a = as;
break;
}
}
if (a) {
form.inputbox.value=v;
location= a.href;
document.myform.submit();
}
}
</script> "
html "<form name='myform'>"
html "<input type='checkbox' name='inputbox' value='Bike' id='vehicle' onclick='inform(this.form,""."",""Bike"")' /> I have a bike<br />
<input type='checkbox' name='inputbox' value='Car' id='vehicle' onclick='inform(this.form,""."",""Car"")' /> I have a car"
html "</form>"
wait
[test]
cls
inf$= #request get$("vehicle")
print "You clicked ";inf$