Link to home
Start Free TrialLog in
Avatar of chestertbear
chestertbear

asked on

IFRAMES and targets

Hi all,
I have an app that makes extensive use of iframes.  (Yes, I know, unfashionable... no lectures please.)  Essentially, it builds the top page with menu items on the left, and then loads the target of  those menu items into an iframe 'content' on the right.  The rationale is that as a visitor cycles through menu items, most of the page doesn't change, therefore, there's no point reloading it.

The top page will have html something like this...
<head...
..../head>
<body>
<a href = 'somescript.php' target='content'>Something</a>
<iframe id='content' name='content' src='blank.php'></iframe>
</body>
</html>

This problem has me baffled...
It mostly works, but occasionally, and for no reason that I've been able to detect, you will click on a menu item, the target of which is definitely set to 'content', and the browser will open a new window (or tab).  It happens in IE, FF, Iron/Chrome and Safari.

I looked at the html doc type and changed it to
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

That helped, in that the wayward loading occurs less frequently, but it hasn't eliminated it altogether.  

I'm open to suggestion.

Thanks
CTB
ASKER CERTIFIED SOLUTION
Avatar of redrider02
redrider02
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chestertbear
chestertbear

ASKER

Thanks redrider02.
That's a pretty good suggestion, from a coding perspective, but it doesn't eliminate the annoying blank-screen/wait page reload at the user's end.
I guess my problem now is that the iframe architecture is so embedded in the app (and it's a HUGE app) that to move away from it is a very big re-write that, commercially, I don't have time for.
However, I'm going to accept it as a slution because you've thought out of left field, and as it's clear that the iframe is fundamentally floored, yours is a valid suggestion.
Cheers, and thanks.
CTB
While the solution doesn't directly address the problem, it does address the core probolem, which is that in hindsight, it ws a mistake to build this app with the iframe architecture, not because the intention wasn't good, but because iframes clearly have some 'undocumented' limitations.