Results 1 to 4 of 4
Aug 27, 2003, 02:34 #1
- Join Date
- Feb 2002
- 0 Post(s)
- 0 Thread(s)
How to disable an 'href' link using JS?
I am making a page that uses JS to bring up a "popup <div>" when the user clicks on a particular link. I am concerned that if the users browser has JS turned off, nothing will happen when they click. I thought the way around this would be to have a valid href in the link so that if the JS doesn't work, the browser will be directed to an alternative page.
Can I include something in my JS function so that when the user clicks the link, the JS will run and disable the href link at the same time? My thinking is, if JS is disable in the browser, this function would not work, so the browser would continue to load the href link.
Regards, benExperience is that thing which lets you know you've made the same mistake yet again.