Using javascript width a-tag href atribute

Recently i’ve descovered a problem with using javascript and events with anchor tags
the folowing code is not compatible with IE6, but works on everything else

<a href=”javascript:return;”  onclick=”javascript:doSomething();”>mjau</a>

when run this code results in Javascript – error  in IE6..
to resolve this,. issue ,.. you can do following ,.. move the return statment after
your javascript funktion.. like this

<a href=”#” onclick=”javascript:doSomething(); return false;”>mjau</a>

problem solved ,.. (c:

Advertisements

2 Responses to Using javascript width a-tag href atribute

  1. Stunning… very great subject. I am going to blog about it too.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: