Solved

location.hash problem with IE

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
alert on input text 2 23
Hide and Unhide Table 6 24
Two decimal 5 25
Validating number not work with decimal 4 23
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

713 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