SirShurf wrote:
I have opened FireFox that gives a better JS concole... and I am
getting
Error: opener.document.new_entry.submit is not a function
Source File:
Line: 47
That means that the form new_entry doesn't exist as far as the function
is concerned (it may actually be in the page).
Try the following:
<html><head><title>Child play</title>
</head><body>
<script type="text/javascript">
function newWin(url) {
newWin2=window.open('','CallMePopUp','');
var tmp = newWin2.document;
tmp.write(
'<html><head><title></title>',
'</head><body><form name="formName" action="">',
'<input type="text" name="prodh" value="bred">',
'<input type="submit">',
'</form>',
'<input type="button" value="Submit parent form" onclick="',
' window.opener.document.forms[\'new_entry\'].submit();',
'window.close();',
'">',
'</body></html>'
);
tmp.close();
}
</script>
<input type="button" value="Open child" onclick="newWin();">
<form name="new_entry" action="">
<input type="text" name="blah" value="afasdf">
<input type="submit">
</form>
</body></html>
--
Rob