PDA

View Full Version : accessing form stuff when form has no name.


scroots
04-20-2003, 02:01 PM
there is
<form method=get action=process.pl>
<input type=checkbox name=kw> jjj<br>
</from>
<script>
function boo(){
alert(form.kw);
}
</script>

how can i acess the checkbox using a javascript, when the script tags are outside of the form tags. i know how to do it when the form has a name, but the problem is this form doesn't.

scroots

x_goose_x
04-20-2003, 02:45 PM
document.forms[0].input_name.value

scroots
04-20-2003, 02:52 PM
thanks that works perfectly.

scroots