Page 1 of 1

Void [SOLVED]

Posted: Wed Apr 19, 2006 12:05 pm
by s.dot

Code: Select all

<a href="javascript: void;" onClick="doShow('val');">View Link</a>
I'm pretty sure this is quite simple, but this gives me a javascript error. It works, but the error Syntax Error shows in the javascript console.

I can't use # because it triggers one of my mod rewrites unless I put the full script path/name and query string.

So what's the correct way to do javascript: void; ?

Posted: Wed Apr 19, 2006 12:09 pm
by John Cartwright
<a href="javascript: void(0);" onClick="doShow('val');">View Link</a>

Posted: Wed Apr 19, 2006 12:17 pm
by s.dot
Ah, yes. That did the trick.

Many thanks, JCart.