submitting child form from parent window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hashya
    New Member
    • Nov 2006
    • 5

    #1

    submitting child form from parent window

    Hi,

    I am trying to submit form in child window from parent window itself. However, not getting through it.
    e.g.
    Parent Window:
    [HTML]
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>

    <script language="JScri pt">
    var child;

    function OpenWindow()
    {
    child=window.op en("D:\\temp\\T est2.html","tes t2");
    child.document. f1.n.value = '123';
    child.document. f1.s.value = '456';
    //child.document. f1.submit();
    //self.close();
    }
    </script>

    <INput type="button" onclick = "OpenWindow ();" value=Refresh>
    <TITLE> New Document </TITLE>
    <META NAME="Generator " CONTENT="EditPl us">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Descripti on" CONTENT="">
    </HEAD>

    <BODY>

    </BODY>
    </HTML>
    [/HTML]

    child Window:
    [HTML]
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <script language="javas cript">
    </script>
    <INput type="button" onclick = "" value=Refresh>
    <TITLE> test 2 </TITLE>
    </HEAD>

    <BODY>
    <form name="f1">
    <input type="text" name="n"/>
    <input type="text" name="s" />
    <input type="submit" name="suub"/>
    </form>
    </BODY>
    </HTML>
    [/HTML]

    Could anybody please let me know why it not going thru >?? Is there any other way to achieve the same?

    Regards,
    hashyaa
  • vssp
    Contributor
    • Jul 2006
    • 268

    #2
    Hi friend

    I am not clear Please can u expline breifly what u need ?

    vssp

    Comment

    • hashya
      New Member
      • Nov 2006
      • 5

      #3
      yeh let me try to explain you.
      Actually I have 1 HTML say a.html. Suppose i have a link in a.html which will open b.html in new window as child of a.html. Now b.html has a form in it. I want to access the entire form in b.html in a.html itself and even submit it on behalf of b.html.

      Hope I have made it clear for u.

      Regards,
      hashyaaa

      Comment

      • vee10
        New Member
        • Oct 2006
        • 141

        #4
        hi,
        is that to write the submit function in parent window or in client window

        is that u want to see only the output in the child window and whole process

        should be done in parent window is that ur requirement














        Originally posted by hashya
        yeh let me try to explain you.
        Actually I have 1 HTML say a.html. Suppose i have a link in a.html which will open b.html in new window as child of a.html. Now b.html has a form in it. I want to access the entire form in b.html in a.html itself and even submit it on behalf of b.html.

        Hope I have made it clear for u.

        Regards,
        hashyaaa

        Comment

        • hashya
          New Member
          • Nov 2006
          • 5

          #5
          yeh thats correct. Whole process should be done in parent window and child window will just give visual to the user.

          Comment

          Working...