Form Submit on created popup

P

paolomatador

Hello!
I've a little problem.
I've created a dynamic popup with the document.write method with a form
in it to pass some variables I need.
After the page is created I want to submit the form automatically, but
I dont know how, doesn't works.

Here's the code!

var whandle =
window.open("about:blank","pdf",",directories=no,menubar=no,scrollbars=yes,resizable=no,width="+(larghezzaschermo-100)+",height="+(altezzaschermo-100)+",top=50,left=50");
whandle.document.writeln("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0
Transitional//EN'>");
whandle.document.writeln("<HTML><HEAD><TITLE>RIEPILOGHI
CONTABILI</TITLE>");
StrMess += sepRecord;
whandle.document.writeln("<BODY topmargin=0 leftmargin=0 rightmargin=0
bottommargin=0>");
whandle.document.writeln("<form name='miostr' action='creaxml.jsp'
method='post' target='pdf'><input type='hidden' name='StrMess'
value='"+StrMess+"'><input type='hidden' name='titolo'
value='"+titolo+"'><input type='hidden' name='param'
value='"+parent.parent.parametri+"'><input type='submit'></form>");
whandle.document.writeln("</BODY>");
whandle.document.writeln("</HTML>");
whandle.document.writeln("<script type='text/javascript'>");
whandle.document.writeln("document.miostr.submit();");
whandle.document.writeln("</script>");

I think the problem is that the page isn't still completed when try to
submit the form, and something happens.

Instead, if I specify the target of the form as _blank, everything goes
well and the form submit.

If I want to submit on the same page, doesnt works.
Anyone knows how?
Thanks in advance.
Paolo.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top