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

K

K B

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
 

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

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top