Connecting Tech Pros Worldwide Forums | Help | Site Map

Redirect problem in IE

Van Duijn
Guest
 
Posts: n/a
#1: Nov 4 '05
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 - van_duijn23@zonnet.nl



Richard Cornford
Guest
 
Posts: n/a
#2: Nov 4 '05

re: Redirect problem in IE


Van Duijn wrote:[color=blue]
> 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.[/color]

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.
[color=blue]
> ..., 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.[/color]

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>

-?
[color=blue]
> 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"[/color]
^^^^^^[color=blue]
> }
> // End hiding JavaScript -->
> </SCRIPT>
>
> ... but this one does not open the new page in the
> inlineframe, but on top.[/color]

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.


Van Duijn
Guest
 
Posts: n/a
#3: Nov 7 '05

re: Redirect problem in IE


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

"Richard Cornford" <Richard@litotes.demon.co.uk> schreef in bericht
news:dkg82b$q2r$1$8300dec7@news.demon.co.uk...[color=blue][color=green]
> >
> > 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"[/color]
> ^^^^^^[color=green]
> > }
> > // End hiding JavaScript -->
> > </SCRIPT>
> >
> > ... but this one does not open the new page in the
> > inlineframe, but on top.[/color]
>
> 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.
>
>[/color]


Martin van Duijn
Guest
 
Posts: n/a
#4: Nov 7 '05

re: Redirect problem in IE


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



*** Sent via Developersdex http://www.developersdex.com ***
Richard Cornford
Guest
 
Posts: n/a
#5: Nov 23 '05

re: Redirect problem in IE


Van Duijn wrote:[color=blue]
> Thanks! It works fine now. Just can't believe I did not
> see that I should have changed "parent" to "window".[/color]

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.
[color=blue]
> Richard Cornford schreef:[/color]
<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.



Closed Thread