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

    Join Date
    Jun 2003
    Posts
    1
    Rep Power
    0

    Simple JavaScript Needed


    Greetings,
    Not a programmer @ all and I'm sure someone else has already done this.

    I've a # of people going directly to 1 frame on the site (http://homepage.mac.com/czar/offseas...cesfooter.html) because they've either bookmarked it or typed it in, what I want to do is to have a small javascript check to see if there's a referrer, and if there's not (this will show they either typed or bookmarked that file) go ahead and redirect them to the full frameset (site) at http://homepage.mac.com/czar. This way they get where they intend no matter which error they encounter.

    Thanks in advance if you can assist,
    -Scott
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    173
    Rep Power
    12
    I've recently written a javascript to do what you have asked. I'll be making it public and free sometime next week.

    You may be right..it has probably be done before. However, I couldn't find a script that did this...that's why I had to make one.

    Basically, what I did was I used an ugly method....
    Query strings.
    The webpage will load, check the url and reload.
    If the url is not the main page the current page will be inserted into the main page when it reloads.
    Works awesome, in opera7, Ie6, and NS7. With no browser sniffing needed.

    anyway... hope that helps.

IMN logo majestic logo threadwatch logo seochat tools logo