Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] link onclick=location.href not working
- From: lau at goldenweb.com.au (Lau@xxxxxxxxxxxxxxxx)
- Subject: [Javascript] link onclick=location.href not working
- Date: Tue Mar 30 03:12:30 2004
I'm having trouble changing the window.location.href from the onclick event of a link. using IE5.0 It works if the link is wrapped around a button but if its wrapped around text or an image. This works <A HREF='#aa' onclick='window.location.href = "http://www.google.com";'><INPUT TYPE=BUTTON VALUE="BUY"></A> but this doesn't <A HREF='#aa' onclick='window.location.href = "http://www.google.com";'>aaaa</A> In my actual code I have a function in the onclick that determines the URL to assign. It works in IE6.0 but I need to get it working in all browsers. Could you please test this on your version browser and let me know if it works or not? And what workaround can I use. Thanks in advance Lau
- Follow-Ups:
- [Javascript] link onclick=location.href not working
- From: David Lovering
- [Javascript] link onclick=location.href not working
- Prev by Date: [Javascript] js and css display: none
- Next by Date: [Javascript] link onclick=location.href not working
- Previous by thread: [Javascript] xhtml and JS
- Next by thread: [Javascript] link onclick=location.href not working
- Index(es):