roo141
02-13-2004, 10:46 AM
Hi
I'm trying to change the value of a hidden input field in a form when another button is clicked.
Something like,
<html>
<head>
<script type=Javascript>
function updateValue()
{ document.all.test.blah.value = 2;
}
</script>
</head>
<body>
<form name=test>
<INPUT name=blah type=text value=0>
</form>
<img src=em.gif onCLick=updateValue()>
</body>
</html>
I knew how to do this once but just can't remember what the proper way to reference it through the document is.
Any help is much appreciated.
Thanks
I'm trying to change the value of a hidden input field in a form when another button is clicked.
Something like,
<html>
<head>
<script type=Javascript>
function updateValue()
{ document.all.test.blah.value = 2;
}
</script>
</head>
<body>
<form name=test>
<INPUT name=blah type=text value=0>
</form>
<img src=em.gif onCLick=updateValue()>
</body>
</html>
I knew how to do this once but just can't remember what the proper way to reference it through the document is.
Any help is much appreciated.
Thanks