Jump to content

OnLoad Redirection JS going wrong in Frames


FrostbiteXIII

Recommended Posts

Hi guys,I am hoping that this isnt a big deal, but I have just found a bug in one of my first websites.It is from back in the days when I still used frames, so I had a bit of code in the Body tag to redirect the user to get the main frame layout when they went to the site avoiding frames.Website link:www.catkisses.co.ukExample to see code in action:www.catkisses.co.uk/catkisses.htmlCode Snippet:

<body onLoad="if (top == self) top.location.href = 'http://www.catkisses.co.uk/index.html';">

Now, I have had this for years, but I have just seen it fail on a friends PC when, using IE, they clicked on a link on the side bar, and it appeared to take them to the page itself (not load the page within the frame) briefly, so it kept redirecting them to the index page!Is there a setting in IE that avoids the target tag in a link, or can you think of anything else that might cause this?Thanks in advance for any help.Frosty

Link to comment
Share on other sites

Is bumping your own topic really cheeky? :) :)

Considering theres only one other post in this forum theres not much point in bumping it...:blink: I would suggest maybe wait at least a day before bumping (if theres any need) :) it's not against the rules so you are free to do whatever
Now, I have had this for years, but I have just seen it fail on a friends PC when, using IE, they clicked on a link on the side bar, and it appeared to take them to the page itself (not load the page within the frame) briefly, so it kept redirecting them to the index page!Is there a setting in IE that avoids the target tag in a link, or can you think of anything else that might cause this?
I tried it with IE and it worked fine, as long as you point to the target frame then i don't think there's much else you can do. Maybe it was a bug with their browser, we know what IE's like afterall . Are they running an older version? Try using Firefox or Opera from their machine and see what happens.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...