Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question force orphan into iframe on index.html

    Hi,

    I'm sure this has been asked a million times, but I can't find an example that I can make work.

    Note: I am not familiar with variables and javascript so I need it explained as "cut & paste" as possible

    I am trying to force my orphaned content pages to reload back into their iframe on my index.html page. EG if a search engine indexes a content page and some one clicks it in their results, it will then load and refresh itself into the main EXISTING frame in index.html

    I have tried a bunch of more complex scripts than below as well. No success. Not sure what I am doing wrong. It needs to be as browser compatible as possible, IE, Netscape & Safari mainly.

    I'd really appreciate your help!
    Thanks in advance..

    Cheers!

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    if (top == self) self.location.href = 'http://www.staticfarm.com/index.html' target='iframe';
    // -->
    </SCRIPT>

  • #2
    Regular Coder
    Join Date
    Oct 2003
    Location
    on a ship
    Posts
    574
    Thanks
    1
    Thanked 6 Times in 5 Posts

    try this

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    if (top == self) self.location.href ="http://www.staticfarm.com/index.html& target=iframe";
    // -->
    </SCRIPT>

    where 'target' is a variable in the index.html main window.

  • #3
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    Thats great.
    thanks for your time.

    I am prett lame at JS tho, (eh I have little or no idea at all).
    Could you explain how I would do the variable on my parent iframe?

    The 2 pages I am trying to link up like this are:
    www.staticfarm.com/index.html (has the iframe)
    www.staticfarm.com/products/bias.html

    Sorry for being thick.

    Cheers


  •  

    Posting Permissions

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