...

View Full Version : How to stop sending a new request when clicking a link on a navigation (frame) ??



wty
07-28-2002, 10:18 PM
Hi,

I have a problem with frames on IE. Every time, I click a link on a navigation (frame), a new request is sent. I need to prevent it from happening.

Here is the details:

I have two frames. The left one is a navigation. The right one is a response page. When click on any link (Top, Acct, Cust, or Bottom) on the left navigation, the page in the right frame will be redisplayed with the link portion on the top of the screen.

It works well with NN, but not with IE. For IE, every time I click any link on the navigation, it sends a new request out. Then redispaly the page on the right frame.

Any suggestions for fixing this problem?

Thanks!

wty

Below is a sample of code for your reference (hopefully I didn't confuse you):

<HTML>
<HEAD>
<TITLE>ABCD Frames</TITLE>
</HEAD>
<FRAMESET cols="200,*">
<FRAME name="nav" src="/htdocs/lif_blank_white.html" marginwidth="4" marginheight="4" scrolling="Auto">
<FRAME name="res" src="<%=for_response%>" marginwidth="4" marginheight="4" scrolling="Auto">
</FRAMESET>
</HTML>

------------------------------------
part of the code for_response:



<HTML>
<HEAD>
<TITLE>ABCD RESPONSE</TITLE>
<style type="text/css">
<!--
BODY {
font-family : "Times New Roman", Times, serif;
font : small;
}

U {
font-family: monospace;
color: #000000;
}

SMALL {
color : Black;
font-family : "Times New Roman", Times, serif;
font-weight : bold;
font-size : x-small;
}
-->
</style>
</HEAD>

<BODY BGCOLOR="#FFFFFF">


<!-- javascript section -->
<script LANGUAGE="JavaScript1.1">
function setClose(){
//window.close();
top.close();
}

</script>
<!-- javascript section (ABCD)-->

<FORM name="TheForm" action="abcd.jsp" method="POST" target="_top">


<!-- TITLE SECTION-->
<a name="Top">
<CENTER>
<h2>ABCD RESPONSE</h2>
</CENTER>
<!-- /TITLE SECTION-->
<BR>
<CENTER>
<HR ALIGN="center" WIDTH="100%">
<!-- BUTTONS SECTION -->
<input type="button" value="APPLY" onClick="setApply()">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="CLOSE" onClick="setClose()">

<HR ALIGN="center" WIDTH="100%">
</CENTER>
<!-- /BUTTONS SECTION -->
<BR>

<!-- ACCOUNT SECTION -->
<a name="Acct">
<%@ include file="include/ABCD_Acc_Section.inc" %>
<!-- /ACCOUNT SECTION -->

<!-- CUSTOMER LOCATION -->
<a name="Cust">
<%@ include file="include/ABCD_Cust_Location.inc" %>
<!-- /CUSTOMER LOCATION -->

</FORM>

<a name="Bottom">

<script language=javascript>
<!--
var win = window.open("", "nav", "");
var
with (win.document) {
open("text/html", "replace");
write("<html>");
write("<head>");
write("<br>");
write("<table border=0 width=100% cellspacing=0 cellpadding=1>");
write("<tr><td bgcolor=#FFFF99 colspan='23' align='center'><font color ='red'>Hunting on this CSR? </font></td><td bgcolor=#FFFF99 colspan='3' align='center'><font color ='red'><b>"+huntAlert+"</b></font></td></tr>");
write("</table>");
write("<br>");
write("<title>WTN Navigator</title>");
write("</head>");
write("<body bgcolor='#87ceeb'>");
write("<center>");
write("<table border=0 width=100% cellspacing=0 cellpadding=1>");
write("<tr><td colspan='6' align='center'><b>Navigator</b></td></tr>");
write("<tr><td colspan='6' align='right'><A href='<%=for_link%>#Top' target='res'><small>Top</small></td></tr>");
write("<tr><td colspan='6' align='left'><A href='<%=for_link%>#Acct' target='res'><small>Account section</small></td></tr>");
write("<tr><td colspan='6' align='left'><A href='<%=for_link%>#Cust' target='res'><small>Customer location</small></td></tr>");
write("<tr><td colspan='6' align='right'><A href='<%=for_link%>#Bottom' target='res'><small>Bottom</small></td></tr>");
write("</table>");
write("</center>");
write("</body>");
write("</html>");
close();
}
//-->
</script>

</BODY>
</HTML>

tamienne
07-29-2002, 09:46 PM
have you tried removing the target='res' from your links? They're already in the res frame...

wty
07-31-2002, 02:28 AM
tamienne,

Thank you for your response! I tried removing the target='res' from my links, it didn't work. When I click on a link, it doesn't jump any more.

Thanks anyway!

wty



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum