Jump to content

Check if frame exists


therealwesfoster

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/96977-check-if-frame-exists/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.