Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

frames

Posted on 1998-12-02
5
Medium Priority
?
182 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 400 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

886 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