Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    wty
    wty is offline
    New Coder
    Join Date
    Jun 2002
    Location
    NJ
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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>

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Delaware, USA
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    have you tried removing the target='res' from your links? They're already in the res frame...

  • #3
    wty
    wty is offline
    New Coder
    Join Date
    Jun 2002
    Location
    NJ
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •