PDA

View Full Version : Force out of iframe - ajax tabs



AllenN
10-02-2009, 01:10 AM
1) Script Title: Ajax Tabs

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

3) Describe problem: I need to force and iframe tab to reload the entire page if my session times out. Using javascript will not work. Javascript will not execute and I can't use php header for redirect because of the majority of the page already being written to the browser. How can I force the iframe tab to reload the entire page?

jscheuer1
10-02-2009, 02:30 AM
I'm not exactly sure what you want or why. Could you be more specific?

In any case, javascript will always execute unless it is disabled in the client's browser - easily detected (I believe - PHP is not my strong point) via PHP before anything else is loaded. So I imagine we are left with a situation where javascript could be of use if only PHP or javascript itself could tell it when something happens. This can always be accomplished via polling (not the preferred solution if another is available), if by no other means.

To be more specific I would need to know more about this situation. I may even need some help from my colleagues more versed in PHP. I most probably can handle the javascript end of things.

AllenN
10-02-2009, 01:21 PM
Thanks for the reply. Basically the ajax tabs iframe type won't execute javascript within the iframe (possibly because of the ajax processing to render the page). I did find a work around though. I used a standard tab type to load an html page and in the html I use an iframe .. this way the ajax method of loading the content is avoided and the javascript to force the reload of the entire page works.

jscheuer1
10-02-2009, 01:51 PM
You are right. AJAX imported script code usually will not execute, though one or more of the script libraries (like jQuery and Prototype -not sure if these specific libraries do) that handle AJAX have options to do this. Even in the absence of utilities specifically for this, there is often a workaround which doesn't require iframe - though if that works for you, that's fine with me.