Redirect problem in IE

V

Van Duijn

I use an inlineframe to display pages with images with javascript pop up
links. These image pages redirect to each other with the trusted <meta
http-equiv="refresh" content="10; url=vb9.htm"> metatag.

Now this works perfectly well in Netscape and Firefox, but Internet Explorer
is spoling the fun. After you click an image to open the popup box, the
image pages (in the inlineframe) won't refresh anymore. As long as you don't
click an image, there's nothing wrong.
Now, I've tried another popup script, but the effect was the same - so the
pop up is not the problem.

I also tried a different redirect script:

<SCRIPT LANGUAGE="JavaScript">
<!-- begin hiding JavaScript from old browsers
// define redirect function
// change redirect2.htm to required destination
function redirect(){
parent.location.href="vb9.htm"
}
// End hiding JavaScript -->
</SCRIPT>

.... but this one does not open the new page in the inlineframe, but on top.

Any suggestions as how to make this work?

Martin van Duijn - (e-mail address removed)
 
R

Richard Cornford

Van said:
I use an inlineframe to display pages with images with
javascript pop up links. These image pages redirect to
each other with the trusted
<meta http-equiv="refresh" content="10; url=vb9.htm">
metatag.

IE->Tools->Internet Options... ->Security ->[select
zone->(Internet)]->Custom Level... ->Micellanious -> Allow META
REFRESH -> Disable/Enable

Trusting something that can be switched off independently of scripting
is not a good plan.
..., but Internet Explorer is spoling the fun. After
you click an image to open the popup box, the image
pages (in the inlineframe) won't refresh anymore. As
long as you don't click an image, there's nothing wrong.

So on Internet Explorer (only) the act of clicking something suddenly
renders the browser partly non-functional? You haven't, by any chance,
wrapped your image in:-

<A href="javascript:something();"><IMG ... ></A>

-?
Now, I've tried another popup script, but the effect
was the same - so the pop up is not the problem.

I also tried a different redirect script:

<SCRIPT LANGUAGE="JavaScript">
<!-- begin hiding JavaScript from old browsers
// define redirect function
// change redirect2.htm to required destination
function redirect(){
parent.location.href="vb9.htm" ^^^^^^
}
// End hiding JavaScript -->
</SCRIPT>

... but this one does not open the new page in the
inlineframe, but on top.

The - parent - of a frame is the window that contains the frame. You are
asking the browser to load the page in the parent and it is doing so.
Replace - parent - with - window - and it probably will work better.

Richard.
 
V

Van Duijn

Thanks! It works fine now. Just can't believe I did not see that I should
have changed "parent" to "window".
 
M

Martin van Duijn

Thanks! It works fine now. Just can't believe I did not see that I
should have changed "parent" to "window".
 
R

Richard Cornford

Van said:
Thanks! It works fine now. Just can't believe I did not
see that I should have changed "parent" to "window".

Fair enough. It would have been nice to have an answer to my question
about whether you were using a link with a javascript pseudo-protocol
HREF around the image. I don't need the answer myself as I already know
that you were (the diagnosis from the symptoms is sufficient in this
case). But there are those who would prefer to dismiss IE's many
problems with javascript pseudo-protocol HREFs and it would have been
good to bring yet another example to their attention.
Richard Cornford schreef:
<snip>

Please don't top-post to comp.lang.javascript, you will find it counter
productive in the long run (though may not actually observe the
consequences).

Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top