Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Chicago, Illinois, USA
    Posts
    177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to open page in frameset when page accessed

    I don't know if this can be done, but I'm sure if someone would know, it would be one of you all!

    If someone goes to one of my pages via a search engine direct link, they end up on the page ("contents") without the rest of the site's frameset. This looks bad and makes navigation sloppy. I have added a link at the bottom of each page to load the main index.htm with frameset, however I also am trying to improve the following:

    ----------------------------------------------------------------
    ... added at the front to try to get this post-able
    ...
    ... <script type="text/javascript" language="JavaScript">
    ... if (window.top==self) location.replace("http://" + location.host);
    ...</script>

    ----------------------------------------------------------------

    That script checks to see if the page is in a frameset, and if not, bounces the visitor to the main entrance to the site.

    ???
    The QUESTION:
    ???

    Can I also somehow specify that the main navigation frameset load, with the designated page in the mainFrame contents frame?

    If you want to see what I'm trying to do, go to:

    http://www.synergest.com/faq.htm

    How can I get that page to reload itself into index.htm in the mainFrame contents frame? (I know I bungled the use of proper terms there, but hopefully you understand the gist of this...)

    I have gotten

    http://www.synergest.com/free-articles.htm

    to bounce to the top/main/entrance of the website, but then the visitor would be lost (e.g. where did that page go that they wanted to see?).
    <font color=blue>Eric A. Spanitz</font color=blue>
    Quality, Project, Management * Training * Consulting
    http://www.spanitz.com * http://www.synergest.com

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: How to open page in frameset when page accessed

    I think it's the same trick as your photo section:

    <script>
    if (self.location == top.location) {
    top.location = "http://www.synergest.com/frameset.html?" + self.location;
    }
    </script>

    And in the frameset, substitute the search parameter into the file name (defaulting to or refreshing to the home page if the parameter is missing).

  3. #3
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Chicago, Illinois, USA
    Posts
    177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to open page in frameset when page accessed

    That's what I am stuck on. I figured it had to be a variation of the Photos thing I asked about earlier... (I'm learning... really! <grin>)

    Within the index.htm:
    ---------------------------------
    ... <frameset rows="131,*" frameborder="NO" border="0" framespacing="0" cols="*">
    ... <frame name="topFrame" scrolling="NO" src="top-project-management-firm.htm" >
    ... <frameset cols="113,*" frameborder="NO" border="0" framespacing="0" rows="*">
    ... <frame name="leftFrame" scrolling="NO" src="left.htm">
    ... <frame name="mainFrame" src="home.htm">
    ... </frameset>
    ... </frameset>
    ---------------------------------

    How to I substitute the variable for src="home.htm" ?

    Thanks again for your help!
    <font color=blue>Eric A. Spanitz</font color=blue>
    Quality, Project, Management * Training * Consulting
    http://www.spanitz.com * http://www.synergest.com

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: How to open page in frameset when page accessed

    Take a look at the script in <post#=308115>post 308115</post#>, and follow the same idea to document.write the second <frame> tag.

  5. #5
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Chicago, Illinois, USA
    Posts
    177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to open page in frameset when page accessed

    Okay. I'm almost there. Take a look at http://www.synergest.com/free-articles2.htm

    Notice the address bar. Something is over-compensating. The http://www.synergest.com/index-redo.htm has the modifications in it. One of them must be goofed up, obviously.

    So that I don't mess up my Karma any more than it is, asking for your help on this second issue, can you send me (private, of course) an email with a real email for you, so that I can send you an Amazon.com gift certificate? Seriously. I appreciate your help, and don't want to be free-loading...
    <font color=blue>Eric A. Spanitz</font color=blue>
    Quality, Project, Management * Training * Consulting
    http://www.spanitz.com * http://www.synergest.com

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: How to open page in frameset when page accessed

    Oh wow, that's the best offer I've had in two years. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    But let's see if we can fix the page first. In the content page, I think I didn't drill down enough when passing the URL. Try this:

    <UL><script type="text/javascript" language="JavaScript">
    if (self.location == top.location) {
    top.location = "http://www.synergest.com/index-redo.htm?" + self.location.pathname;
    }
    </script>[/list]That should give us the address relative to the domain. I guess this isn't critical, but it will look neater. <img src=/S/wink.gif border=0 alt=wink width=15 height=15>

    Then in index-redo.htm, it appears that there's an extra " just before the word mainFrame:

    <UL>document.write("<frame name=""mainFrame"" + " src="" + strHREF.substr(1) + """ + ">");[/list]Does it help to delete that?

  7. #7
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: How to open page in frameset when page accessed

    Scratch that, IE doesn't seem to like script embedded in a frameset, so we have to drive the whole thing with script:

    ...
    </HEAD>
    <script language="JavaScript">
    document.write("<frameset rows="131,*" frameborder="NO" border="0" framespacing="0" cols="*">");
    document.write("

  8. #8
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Chicago, Illinois, USA
    Posts
    177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to open page in frameset when page accessed

    Huh. I think that worked. I think I'm also catching on to the document.write thingy. Oh, how a little knowledge can be dangerous...

    Get thy email to me so I can get your Amazon cert to you. Or if you prefer something else, let me know. I'm serious! Thanks!!!
    <font color=blue>Eric A. Spanitz</font color=blue>
    Quality, Project, Management * Training * Consulting
    http://www.spanitz.com * http://www.synergest.com

Posting Permissions

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