submit the form data to the popup window without a submit button

J

jrefactors

The following will submit the form data to popup by clicking the submit
button. I want it will submit the form automatically to the popup,
there is no submit button in this page.
Basically this page should not show up. Any ideas?? thanks!!

<script type="text/javascript">
function submitmyform(f) {
f.target = 'foo';
window.open('',f.target,'menubar=no,scrollbars=no,width=800,height=800');
f.submit();
return false;
}
</script>

<form name="myform" action="popup.asp" target="_blank" method="post"
onsubmit="return submitmyform(this);">
<input type="hidden" name="item" value="item"/>
<input type="submit" value="submit to popup"/>
</form>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top