poring
11-20-2002, 06:57 PM
I made the following code:
<form id="hi" action="bleh.php">
<div><input type="hidden" name="hehe" value="" /></div>
<table>
<tr><td><a href="#" onclick="document.hi.hehe.value='Something';">Ckick here</a></td></tr>
<tr><td><input type="submit" value="Submit" /></td></tr>
</table>
</form>
It's supposed to set the hidden 'hehe' field to 'Something' when you click on that link. Now the problem is that since I can't use the 'name' attribute for the form in xhtml, I had to put 'id' instead, and this doesn't work. If I put 'name' instead of 'id', it works just fine.
Anyone got an idea of how to get around this? Thanks.
<form id="hi" action="bleh.php">
<div><input type="hidden" name="hehe" value="" /></div>
<table>
<tr><td><a href="#" onclick="document.hi.hehe.value='Something';">Ckick here</a></td></tr>
<tr><td><input type="submit" value="Submit" /></td></tr>
</table>
</form>
It's supposed to set the hidden 'hehe' field to 'Something' when you click on that link. Now the problem is that since I can't use the 'name' attribute for the form in xhtml, I had to put 'id' instead, and this doesn't work. If I put 'name' instead of 'id', it works just fine.
Anyone got an idea of how to get around this? Thanks.