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

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

  1. 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
    , Jun 7, 2006
    #1
    1. Advertising

  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

    <> wrote in message
    news:...
    > 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
    >
    Ray Costanzo [MVP], Jun 7, 2006
    #2
    1. Advertising

  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. 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. =?Utf-8?B?TXJGZXo=?=

    Child window property window.opener null after postback

    =?Utf-8?B?TXJGZXo=?=, Apr 28, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    5,642
    =?Utf-8?B?TXJGZXo=?=
    Apr 28, 2005
  2. Replies:
    1
    Views:
    237
  3. Spammay Blockay
    Replies:
    1
    Views:
    396
    Dietmar Meier
    Feb 4, 2005
  4. window.opener, form.opener?

    , Jul 14, 2006, in forum: Javascript
    Replies:
    5
    Views:
    267
  5. Bitswapper
    Replies:
    5
    Views:
    108
    Prasad, Ramit
    Aug 27, 2013
Loading...

Share This Page