Help with popup

Discussion in 'ASP .Net' started by Guest, Feb 17, 2005.

  1. Guest

    Guest Guest

    Hi,
    I am loading a popup from my parent page when an image is clicked. How can I
    now pass a value from a textbox to the popup page. Currently this is how I am
    calling the popup from parent page

    <A href="javascript:GetInfo(txtRetVal', true)"><IMG height="16"
    src="images/lookup.gif" width="16" align="middle" border="0"></A>

    txtRetVal is the name of the textbox on the parent page that accepts the
    value returned from the popup.

    Thanks
     
    Guest, Feb 17, 2005
    #1
    1. Advertisements

  2. Guest

    Guest Guest

    you might wanna take a look at query strings
    Hth..
    R. Thomas
     
    Guest, Feb 18, 2005
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    Or you might call the opener window. We've included small sample code, one
    containing some code from a default.htm page, the other one should be saved
    in 'open.htm'. The javascript from open.htm calls the opener page. Hth.

    Kind regards,
    Nikander & Margriet Bruggeman

    Default.htm:

    <html>
    <head>
    <script>
    var strGlobal = "test1";

    function SayHi()
    {
    return "Hello!";
    }

    function ChangeGlobal()
    {
    strGlobal = "aaa";
    }
    </script>
    </head>
    <body>


    <a href="#" onClick="window.open('open.htm', 'myWin','toolbar=no,
    directories=no, location=no, status=yes, menubar=no, resizable=no,
    scrollbars=no, width=300, height=200'); return false">
    Open</A>

    <a href="javascript:ChangeGlobal()">Change</a>

    </body>
    </html>

    Open.htm:

    <html>
    <body>

    Open

    <script>
    alert(window.opener);
    alert(window.opener.strGlobal);
    </script>

    </body>
    </html>
     
    Guest, Feb 18, 2005
    #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.