#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Posts
    3
    Rep Power
    0

    Question


    Hi all, I'm very new to this, so appologies in advance for ignorance.
    I inserted a frameforce JavaScript into the head of my infopop UBB.
    The purpose is so that nobody can go straight to my message board.
    They have to enter through my home page first, so they must see the
    introduction and enter the frameset at the rigtht time. here is the script.

    <SCRIPT LANGUAGE="JavaScript">

    <!-- Begin
    if (parent.location.href == self.location.href) {
    window.location.href = 'www.domain.com/index.html';
    }
    // End -->
    </script>

    The script works fine in other area of my site, but because the ultimatebb.cgi is in the cgi-bin,
    (along with my updated head tag,) It's redirecting to
    www.domain.com/cgi-bin/www.domain.com/index.html
    I tried having it redirect to an html file in the cgi-bin that would then redirect to http://www... . However, I can not run html from the cgi bin,
    so I need to know how to change the javascript to refer to the parent directory before pointing
    to the index.html. See what I mean? would this be a simple change to the original JavaScript?
    something like

    window.location.href = '..index.html';

    Obviously not correct, but just so you see what I'm getting at.
    Any help is greatly appreciated.
    thankyou
    john

    P.S.
    I get my scripts from the javascript source, so
    I think it's important that I leave the Credited version in here.
    I just wanted to make the code easy to read in my post.

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Original: CodeLifter.com (support@codelifter.com) -->
    <!-- Web Site: http://www.codelifter.com -->

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin
    if (parent.location.href == self.location.href) {
    // change the url below to the url of the
    // frameset page...
    window.location.href = 'www.falsepajamas.com/index.html';
    }
    // End -->
    </script>
  2. #2
  3. No Profile Picture
    Seņor Member
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2000
    Posts
    1,157
    Rep Power
    38
    I'm not certain if the solution to your problem is quite this simple, but what about "../index.html"?
    Michael
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Posts
    3
    Rep Power
    0

    Cool FIXED!


    Well thanx for the help, but I must have made a mistake the first time around.
    I changed it to the full url again, http://www.domain.com
    and this time it worked!
    Thanx again for your help.
    John

IMN logo majestic logo threadwatch logo seochat tools logo