calling a function on the parent form from a popup window

Discussion in 'ASP .Net' started by Michelle Stone, Dec 25, 2003.

  1. I have an asp.net form, which calls a popup window.

    The popup window, based on some user input should call a
    function on the parent window.

    Is this possible?

    I have tried creating a javascript function in the .aspx
    file and used the following to call the javascript
    function from the popup window

    Response.Write ("<script
    language=javascript>window.opener.doRefresh ();
    </script>");

    But I want to call not a javascript function in the .aspx
    file, but a c# function in the aspx.cs file. How do I do
    this?

    Thanks
     
    Michelle Stone, Dec 25, 2003
    #1
    1. Advertising

  2. Michelle Stone

    Natty Gur Guest

    Hi,

    As far as I know it's impossible to call parent page client script from
    server side of popup window. Your client side script approach is
    probably the best way. Anyway consider to use RegisterClientScriptBlock
    instead of Response.write().


    Natty Gur[MVP]

    blog : http://weblogs.asp.net/ngur
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Dec 28, 2003
    #2
    1. Advertising

  3. Michelle Stone

    Natty Gur Guest

    Hi,

    As far as I know it's impossible to call parent page client script from
    server side of popup window. Your client side script approach is
    probably the best way. Anyway consider to use RegisterClientScriptBlock
    instead of Response.write().


    Natty Gur[MVP]

    blog : http://weblogs.asp.net/ngur
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Dec 28, 2003
    #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. Earl Teigrob
    Replies:
    4
    Views:
    1,227
    Vidar Petursson
    Jun 5, 2004
  2. Earl Teigrob
    Replies:
    1
    Views:
    5,878
    Earl Teigrob
    Jun 16, 2004
  3. chuckdfoster

    Send Info From PopUp Window To Parent Window

    chuckdfoster, Dec 6, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    744
    =?Utf-8?B?SmVk?=
    Dec 6, 2005
  4. Bhishm
    Replies:
    2
    Views:
    806
    bruce barker
    Sep 3, 2007
  5. Bhishm
    Replies:
    2
    Views:
    240
    Thomas 'PointedEars' Lahn
    Sep 4, 2007
Loading...

Share This Page