Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

page refresh with frames 1

Status
Not open for further replies.

dafirsdon

Technical User
Dec 20, 2000
3
US
I am having a problem with this jsp page. I have created a dynamic chat button that when clicked produces a popup window that accesses a jsp file from my server and creates a login page on the users window in the popup window. I have also incorperated a script that replaces the original window with a similar page with a tracking script in it when the button is clicked and the popup window displays. I have incorperated the script into a jsp file on my server. My problem is that when you click the button and the popup window displays, the browser replaces the page but it does so in the top frame of the original page instead of the whole page being replaced. Here is the part of the jsp file that displays my script. Please Help!
<code>
// Define the JavaScript code that displays the live button
StringBuffer liveHelpJS = new StringBuffer();
liveHelpJS.append ( &quot;document.write('<a href=\&quot;#\&quot; onClick=\&quot;MM_openBrWindow(\\' &quot; );

liveHelpJS.append ( &quot;,\\'livedemo\\',\\'resizable=yes,width=400,height=400\\')\&quot;>&quot; );

liveHelpJS.append ( &quot;<img src=\&quot;image.gif\&quot; onClick=\&quot;location.replace(\\' border=\&quot;0\&quot;>&quot; );

liveHelpJS.append ( &quot;</a>');\n&quot; );
</code>

I am assuming that the location.replace is replacing the image in the frame instead of the whole page because it is connected to the image. How can I get around this? Any help you could give me would be greatly appreciated.
 
so use parent.location.replace()... jared@aauser.com
 
parent.location.replace worked like a charm. Thank you very much for your help jaredn.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top