Solved

frames

Posted on 1998-12-02
5
170 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now