[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Subpages and Frames...

Posted on 1998-05-05
9
Medium Priority
?
214 Views
Last Modified: 2013-12-25
When you first come to my site, I have three frames set up.  A banner up top, table of contents on the left, and the main on the right.  My question is this, is there anyway for me to access a subpage directly and have the frames load?  The reason I'm asking is because I'd like to submit my subpages to the search engines, and when the user clicks on the link, have the frames load, and then the subpage load in the main frame.  If this sounds confusing let me know.  Thanks for the help!
0
Comment
Question by:ingenito
[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
  • 4
  • 3
  • 2
9 Comments
 

Author Comment

by:ingenito
ID: 1855312
Here's another way of putting it.  The user searches on a search engine for videos.  They see a link to my site about Windows Videos.  How can I have the user click on the link and have the frames load with the Windows Video information and not just to my main page?  I am willing to use Javascript but I don't want a seperate frame source on each page (I have over 200 pages) nor do I want a cgi script to do it.  Is there any way to do this?
0
 
LVL 3

Accepted Solution

by:
percyn earned 500 total points
ID: 1855313
Yes.
    You have to check the number of frames (frames.length) on each page and if the frames.length<1, then load the frameset by using location.href="myframeset.html"


0
 

Author Comment

by:ingenito
ID: 1855314
I'm sorry, but I don't understand.  Are you saying to put this code on every 'content' page to check for the frames?  If you are, then wouldn't the location.href="myframeset.htm" load the main page? I'm very familiar with javascript.  If you could, an example would be great.
0
Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

 
LVL 5

Expert Comment

by:julio011597
ID: 1855315
It seems you could put something like this in each of your subpages:

--//--
<HTML>
  <HEAD>
    <SCRIPT LANGUAGE="Javascript"><!--
      if(!self.parent) self.location.href = "myFrameset.htm";
    // --></SCRIPT>
  </HEAD>
  <BODY>
    ...
  </BODY>
</HTML>
--//--

Is this what you meant?

-julio
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1855316
BTW, i guess this is what percyn also meant... but, shouldn't be: top.frames.length?
0
 
LVL 3

Expert Comment

by:percyn
ID: 1855317
Yes,
    Check the top.frame.length and if it is <1, load up a frameset. How remember that you can load a frameset which loads one static page (like a menu) and another page which uses Script or CGI/ASP to accept a frame src as a passed parameter. Thus if you have 200 pages, you dont need 200 framesets, just one frameset, which can accept an argument to load any of the 200 frames.
0
 

Author Comment

by:ingenito
ID: 1855318
Since I want the content pages to be submitted to the search engines, I can't have it be a CGI script.  I think I figured it out though, please tell me if this implementation is practical.

On each of the pages I have added this just before the body tag:

<script language="javascript">
<!--

if(!top.frames.length){
document.writeln('<frameset framespacing="0" border="false" frameborder="0" rows="65,*">');
document.writeln('  <frame name="banner" scrolling="no" noresize target="contents" src="../../banner.htm" marginwidth="0" marginheight="0">');
document.writeln('  <frameset cols="192,*">');
document.writeln('    <frame name="contents" target="main" src="../../contents.htm" scrolling="no" noresize marginwidth="0" marginheight="0">');
document.writeln('    <frame name="main" src="account.htm" scrolling="auto">');
document.writeln('  </frameset>');
main.location.href="account.htm";
}

<!-- end of script -->
</script>

Now, this seems to work perfectly in MSIE 4.0 but not Netscape.  Can someone tell me why?
0
 
LVL 3

Expert Comment

by:percyn
ID: 1855319
top.frames.length is an int, not a boolean. Check for the exact value, i.e. 0,1,2,3, etc.



0
 

Author Comment

by:ingenito
ID: 1855320
It still doesn't work, if you'd like the page URL is http://www.corporatetrain.com/software/accounting/account.htm

Please take a look and let me know if you can tell what's wrong...
0

Featured Post

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

656 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