Solved

location.hash problem with IE

Posted on 1997-11-05
2
216 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 100 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now