Hi all,
I am working on a server that has a predefined form page.
The form page follows like:
<form action=blah.cgi method=post>
<input type=hidden name=name value="Mr. Jones">
</form>
There is no name in the form and I can't change that predefined form to have a name. I want to do this.
<script>
alert("Hi there "+document.forms[0].name.value);
</script>
But it's giving me an error that says:
document.forms.0.name is null or not an object
why is this not working? according to javascript specs this should work shouldn't it?
Kenneth
I am working on a server that has a predefined form page.
The form page follows like:
<form action=blah.cgi method=post>
<input type=hidden name=name value="Mr. Jones">
</form>
There is no name in the form and I can't change that predefined form to have a name. I want to do this.
<script>
alert("Hi there "+document.forms[0].name.value);
</script>
But it's giving me an error that says:
document.forms.0.name is null or not an object
why is this not working? according to javascript specs this should work shouldn't it?
Kenneth