Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

location.hash problem with IE

Posted on 1997-11-05
2
Medium Priority
?
223 Views
Last Modified: 2008-02-26

Why ?

why IE3.0 reload a document when using location.hash ='top' ?
(IE4.0 NE3.0 and NE4.0 doesn't do that !!!)

more details of my problem :

I have two frames (leftFrame and rightFrame)
on leftFrame there are n images whith
onMouseOver="parent.rightFrame.location = 'file.htm#'+n
(REM this doesn't work : onMouseOver="parent.rightFrame.location.hash=n)

on rightFrame (long document)  we found :
<A NAME='1'></A>
text
text
text
<A NAME='2'></A>
text
text
text
....
...
<A NAME='n'></A>

when passing mouse over a picture the rightFrame
go to the specified anchor....
work great with IE but only with localfiles
(because IE3 always call the server for each mouseOver, wich can take a long time !!!)

Do you know a trick for that problem ?
Thanks for your help !

Pierre Bastoul
0
Comment
Question by:pbastoul
2 Comments
 
LVL 10

Accepted Solution

by:
kollegov earned 300 total points
ID: 1272532
Why? because you use:
onMouseOver="parent.rightFrame.location =
           'file.htm#'+n
And MIE3.0 isn't so smart as Netscape to
determine that this is a SAME html.

Unfortuantly MIE do not support
location.hash property as well as other ones
so you can't use other way to
to do this.

No way, sorry...

You can check browser once whil loading:

var browserOK;
if(navigator.appName.indexOf("Internet Explorer"))
  if(navigator.appVersion>=4) {browserOK=true;}
if(navigator.appName.indexOf("Netscape"))
  if(navigator.appVersion>=3) {browserOK=true;}

and later youse this
broserOK variable

onMouseOver="if(broserOK) parent.rightFrame.location='file.htm#'+n"

So, your script wouldn't rload document in MIE :(
0
 

Author Comment

by:pbastoul
ID: 1272533
what about a 'document.search'  of JS ?
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question