When Iframe refreshes it is opened in a new tab

mhdi
mhdi used Ask the Experts™
on
Hi,

I have a page with an iframe on it. A javascript code within the iframe page refreshes the page every few minutes. When the iframe is refreshed the page within the iframe is opened in a new tab. This shouldn't happen, I want it to refresh within the iframe.

It only occurs on some browsers but I am still narrowing down which ones.

If anybody has an idea please let me know.

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
can you post the code that does the refresh?
Commented:
Would you not be better using javascript/jquery to refresh the iframe in the parent page ?
This is one of the problems you could face with the use of iframes today.

Iframes are not standard, deprecated, largely discouraged and each passing day is more probable that latest browser releases stop behaving consistently with them.

My personal recommendation is to abandon the use of iframes ASAP to avoid future problems.
Commented:
@Bardobrave ..  I agree

A moch better option would be to use jQuery and load the page into a div and then refresh the div, this can all be done easily with jQuery ajax

Author

Commented:
Hi all,

The issue was simple. I was testing the page on my local computer. Therefore the pages within the IFrames were considered external pages.

Once I uploaded to web server (making the iframe contents local) it became good.

Thanks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial