I'm trying to send a value from the form to the new window that opens.
In my program the window opens but the value val2 is not sent and instead null exists.
My code:
function eq(value) {
ViewImg = window.open('http://localhost/coord.php?' + value, 'ViewImg', 'width=<?php print $realWidthNewWindow; ?>,height=<?php print $realHeightNewWindow; ?>', 'status=no', 'titlebar=0');
}
<form id='testform_eq' name='testform_new'>
<input type='text' id='val2' name='val2'>
<input type='button' value='Submit' onclick='eq(document.getElementById(val2))'>
</form>
Does anyone have an idea why this is so? Thanks