reloading frame page from popup...better solution to my problem?

Discussion in 'ASP .Net' started by K B, Dec 21, 2006.

  1. K B

    K B Guest

    Hi, I could be approaching this all wrong...so please let me know what
    you think.

    I have a 2 page frame (WIleft.aspx and WIright.aspx) in asp.net 2.0. I
    create an html page by transforming xml with xsl file into WIright and
    there are buttons created with dynamic parameters to pass when the
    function is run. [left page is used to display other information]
    I have the following script that runs when any given button is clicked
    in WIright:

    function StepComplete(idIn)
    {
    var sIdNo = '&idNo=' + idIn;
    newWindow = window.open(('StepComplete.aspx?' + sIdNo), 'StepComplete',
    'width=50,height=50,toolbar=no,menubar=no,scrollbars=no,resizable=no');
    }
    This opens the pop-up window ok...but my code in the pop-up should run
    (saving to database), then reload the parent frame and close the pop-up.
    PROBLEM is that the parent frame loads into the pop-up window so I then
    have two of the same windows running. I've tried two ways:

    (1) Response.Redirect("WIframe.aspx")
    OR
    (2) Response.Write("<script
    language=javascript>parent.left.location='WIleft.aspx?Step=yes'</script>
    ")
    Response.Write("<script
    language=javascript>parent.right.location='WI.aspx?refresh=true'</script
    >")

    Response.Write("<script>window.close();</script>")

    Option 1 loads a new copy of the wiframe into the popup.
    Option 2 doesn't work for loading the two pages in the frame, but it
    does close the pop-up.

    The buttons correspond to a Step ID in the right frame document, then I
    need to refresh the WIleft to show that new variable.

    I'm not too swift with javascript. Is there a way to adjust the function
    so that I new window doesn't open, but the WIleft.aspx reloads in the
    parent frame and I could pass a query string that way?

    THANKS FOR ANY HELP.
    Kit


    *** Sent via Developersdex http://www.developersdex.com ***
     
    K B, Dec 21, 2006
    #1
    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. , India
    Replies:
    17
    Views:
    1,113
    James Kanze
    Oct 1, 2007
  2. Daniel Frede
    Replies:
    0
    Views:
    97
    Daniel Frede
    Jan 27, 2005
  3. Dynamo

    Help with reloading frame page please

    Dynamo, Jun 28, 2005, in forum: Javascript
    Replies:
    1
    Views:
    100
    David Dorward
    Jun 28, 2005
  4. Replies:
    2
    Views:
    486
  5. pasupathy
    Replies:
    0
    Views:
    176
    pasupathy
    Mar 30, 2006
Loading...

Share This Page