FORM POST TO WINDOW.OPENER (FROM CHILD TO PARENT)

Discussion in 'ASP General' started by gialby, Jun 7, 2006.

  1. gialby

    gialby Guest

    Ciao
    i have this problem....
    i have a main asp page with this code

    PARENT PAGE
    <script language="vbScript">
    function ricerca()

    finestra=window.open("ricerca.asp","","width=500,height=500,top=0,left=0,resizable=yes,scrollbars=yes")

    finestra.focus()

    end function


    window.name="principale"
    </script>


    CHILD PAGE with form that must post data to parent page
    <script language="vbScript">

    sub submit_OnClick

    url="result.asp"
    form.method="POST"
    form.action=url
    form.target=window.opener.name
    form.submit()
    self.close()

    end Sub
    </script>

    the child page (window.open) submit and reload tha parent page but not
    post data.
    in the "result.asp" when i make request.form("input") i not receive
    nothing.
    Why? somebody can help me?

    Thanks
    Gialby
     
    gialby, Jun 7, 2006
    #1
    1. Advertisements

  2. This is all client-side script. You should try asking in a client-side
    scripting group, not a server-side one like this one. Why vbscript? I
    strongly suggest you do this in Javascript and then inquire in a Javascript
    group. microsoft.public.scripting.jscript is a group on this NNTP server.

    Ray at work
     
    Ray Costanzo [MVP], Jun 7, 2006
    #2
    1. Advertisements

  3. Ray is correct,

    The best way to do that sort of scripting is done through jscripting.
    Good Luck
     
    Nico VanHaaster, Jun 8, 2006
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.