Connecting Tech Pros Worldwide Help | Site Map

Redirect problem in IE

  #1  
Old November 4th, 2005, 05:25 PM
Van Duijn
Guest
 
Posts: n/a
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


  #2  
Old November 4th, 2005, 06:15 PM
Richard Cornford
Guest
 
Posts: n/a

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.


  #3  
Old November 7th, 2005, 10:55 AM
Van Duijn
Guest
 
Posts: n/a

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]


  #4  
Old November 7th, 2005, 10:55 AM
Martin van Duijn
Guest
 
Posts: n/a

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 ***
  #5  
Old November 23rd, 2005, 03:10 AM
Richard Cornford
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect Problem in IE Ray answers 1 January 23rd, 2006 06:49 PM
Response.Redirect URL Address in IE 6 SP1 from Page Refresh Dr. Paul Caesar - CoullByte (UK) Limited answers 2 November 19th, 2005 08:00 AM
Problem with postback in ie on same machine.... rlynch99@nospam.nospam answers 1 November 18th, 2005 07:39 PM
Response.Redirect problem Gary answers 3 July 19th, 2005 12:17 PM