Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Form Submit on created popup

Reply
Thread Tools

Form Submit on created popup

 
 
paolomatador@libero.it
Guest
Posts: n/a
 
      07-28-2005
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,m enubar=no,scrollbars=yes,resizable=no,width="+(lar ghezzaschermo-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>RIEPI LOGHI
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert form to submit on load instead of clicking submit button? Network-Man HTML 5 07-07-2012 12:06 PM
submit 1 form to 2 servers or 2 forms to 2 server (1 form each) on 1 submit abansal.itp@gmail.com Javascript 3 06-23-2007 07:29 AM
submit the form data to the popup window without a submit button jrefactors@hotmail.com Javascript 2 01-01-2005 06:07 AM
submit the form data to the popup window without a submit button jrefactors@hotmail.com HTML 2 01-01-2005 06:07 AM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM



Advertisments