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 ( "document.write('<a href=\"#\" onClick=\"MM_openBrWindow(\\' " );
liveHelpJS.append ( ",\\'livedemo\\',\\'resizable=yes,width=400,height=400\\')\">" );
liveHelpJS.append ( "<img src=\"image.gif\" onClick=\"location.replace(\\' border=\"0\">" );
liveHelpJS.append ( "</a>');\n" );
</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.
<code>
// Define the JavaScript code that displays the live button
StringBuffer liveHelpJS = new StringBuffer();
liveHelpJS.append ( "document.write('<a href=\"#\" onClick=\"MM_openBrWindow(\\' " );
liveHelpJS.append ( ",\\'livedemo\\',\\'resizable=yes,width=400,height=400\\')\">" );
liveHelpJS.append ( "<img src=\"image.gif\" onClick=\"location.replace(\\' border=\"0\">" );
liveHelpJS.append ( "</a>');\n" );
</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.