Solved

frames

Posted on 1998-12-02
5
177 Views
Last Modified: 2010-04-09
Below is some code that has really got me stumped.  This page is loaded from a page with frames and I need a new window to load and this page to be loaded.  It woks fine in IE but in NS it locks up NS after loading it in the main body of the originating document.  I am in a rush to get this blasted thing fixed within the next 3 hours, (deadline).  Thanks for the quick response in advance.
I posted it in here and JAVASCRIPT so first to answer with a good fix gets the points.
<HTML>
<HEAD>
<TITLE>Welcome</TITLE>
<SCRIPT LANGUAGE="JavaScript">
if (window != window.top)
       top.location.href = location.href;
</SCRIPT>
<FRAMESET BORDER=0 FRAMESPACING=0 FRAMEBORDER=0 COLS="152,*">
<FRAME NAME="left" SRC="left_agentmasterborder.html" SCROLLING="auto" MARGINWIDTH="2" MARGINHEIGHT="1" FRAMEBORDER="no" BORDER="0" NORESIZE>
<FRAME NAME="body" SRC="body_aindex.html" SCROLLING="auto" MARGINWIDTH="2" MARGINHEIGHT="1">
</FRAMESET>
</HEAD>
</HTML>
0
Comment
Question by:csindorf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 6

Expert Comment

by:tecbuilder
ID: 1840162
It sounds as if all that you are doing is loading a new left and right page to an existing window that already has 2 frames declared, why not just open a new window in each frame rather than creating a new frameset.

For example after the button is clicked and validation is ok you would use something like the code below in your redirect function.

parent.left.location.href = "left_agentmasterborder.html";
parent.body.location.href = "body_aindex.html";
0
 
LVL 3

Expert Comment

by:bigelos
ID: 1840163
instead of
top.location.href = location.href;
use
top.window.location = location.href;

tecbuilder:
It appears that this script will "pop" the window out of frames if anyone tries to link to it in their frames.  All of my web pages do it, although a little differently.
0
 
LVL 1

Expert Comment

by:Michel021497
ID: 1840164
Why putting your <FRAMESET> in your <HEAD>
It must be:
 <HTML>
<HEAD> ... </HEAD>
<FRAMESET ... >
..
</FRAMESET>
</HTML>

FRAMEBORDER=0 only works in NS or IE (don't know). FRAMEBORDER=no works in the other one. So put both of them in your <FRAME> declaration.

0
 

Author Comment

by:csindorf
ID: 1840165
Sorry about the confusion but TECBUILDER yesterday had the right answer.  The problem was with me not putting the code in  the right place.  So I am opening this for TECBUILDER to get the credit for.  

Thank you all for such an inflow of great ideas for a strange situation.

Craig
===============================================================
             I sounds as if all that you are doing is loading a new left and right page to an existing window that already has 2 frames  declared, why not just open a new window in each frame rather than creating a new frameset.

              For example after the button is clicked and validation is ok you would use something like the code below in your   redirect  function.

              parent.left.location.href = "left_agentmasterborder.html";
              parent.body.location.href = "body_aindex.html";
0
 
LVL 6

Accepted Solution

by:
tecbuilder earned 100 total points
ID: 1840166
It sounds as if all that you are doing is loading a new left and right page to an existing window that already has 2 frames declared, why not just open a new window in each frame rather than creating a new frameset.

For example after the button is clicked and validation is ok you would use something like the code below in your redirect function.

      parent.left.location.href = "left_agentmasterborder.html";
      parent.body.location.href = "body_aindex.html";

---
tecbuilder
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question