therealwesfoster Posted March 19, 2008 Share Posted March 19, 2008 I have 2 frames. TOP and HOME Sometimes the top frame gets removed by accident. I'm needing a short JS script that checks "if TOP frame doesn't exist, redirece to index.html" Which I would think would be like: if (!window.parent.top) { document.location.href = "index.html"; } But it don't work. Help please. Thanks Quote Link to comment Share on other sites More sharing options...
therealwesfoster Posted March 19, 2008 Author Share Posted March 19, 2008 Well, i ended up doing this: if (self != top) { document.location.href = "./index.html"; } Works just the same SOLVED (although, if you have an answer to my question, feel free to post it. I like learning new things) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.