Form Submit on created popup

Discussion in 'Javascript' started by paolomatador@libero.it, Jul 28, 2005.

  1. Guest

    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.
    , Jul 28, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    6,170
  2. Neil
    Replies:
    6
    Views:
    39,378
    atilio123321
    Sep 2, 2011
  3. Jens Peter Hansen
    Replies:
    7
    Views:
    500
    Randy Webb
    Jun 19, 2004
  4. Replies:
    2
    Views:
    343
  5. Replies:
    3
    Views:
    654
Loading...

Share This Page