Hello,
I was wondering if I could do the following : can I change the formname and
fieldname with an argument? This way I can re-use the script multiple times.
My code (that doesn't work):
-----------------
<script>
function test(arg,arg2) {
document.arg.ar g2.value="yes";
}
</script>
<form name="frmtest">
<input type="text" name="test1" value="hello">
<input type="button" onclick="javasc ript:test('frmt est','test1');" >
</form>
-----------------
How can I make this work?
Thanks in advance!
I was wondering if I could do the following : can I change the formname and
fieldname with an argument? This way I can re-use the script multiple times.
My code (that doesn't work):
-----------------
<script>
function test(arg,arg2) {
document.arg.ar g2.value="yes";
}
</script>
<form name="frmtest">
<input type="text" name="test1" value="hello">
<input type="button" onclick="javasc ript:test('frmt est','test1');" >
</form>
-----------------
How can I make this work?
Thanks in advance!
Comment