The issue is,
I am trying to click on the function set, and when i click Ok afer i get the alert ,it does not fill the text field test for me.This works fine on IE 7 and IE8.I was trying to test on IE9 and it does not do anything.Can anyone point me in the right direction.
function setTest(x)
{
document.add(x).value = "this is a test value";
}
</SCRIPT>
The HTML code is as follows
<td>
<input type="text" name="test" id="test" size="10" value="<?php echo $test;?>">
<input type="button" value="FILL" class="submit" onClick="if( confirm( 'Are you sure you want to set this field.') ){ setTest('test'); }">
</td>
Thanks in advance.
I’ve no idea what
document.addis supposed to do, but if you want to set the value of thatinputfield it looks like you actually wantgetElementById:Example on jsfiddle.