Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE 5 and window.location.href

Status
Not open for further replies.

vlitim

Programmer
Sep 2, 2000
393
GB
I am using the below code

<a href=# onclick=window.location.href='test.htm'>help</a>

which works fine on ie6, but on ie5 it generates no errors but just doesn't do anything!?

does anyone know why this is??

Cheers
Tim

 
you need return false after the window.lcoation:

<a href=&quot;#&quot; onclick=&quot;window.location.href='test.htm'; return false&quot;>help</a>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top