# [web] Overriding onMouseClick on link

## Recommended Posts

Hi, this may sound silly but I was wondering if you ever had this problem before.. I want to create a link from text, which is supposed to be deadlink but by using javascript i can open a new window (with all those toolbars dead) so, this is my code :
</a href="#" onMouseClick="window.open 'new.html','newwin')">Click this<//a>

ps : the extra slashes on the a tag is not a mistake. I add it because otherwise you won't be able to see my code :). I hope u get the idea If I'm not mistaken, I've been done this before. but now it won't work and I can't find out why. Can somebody know ?? I need to use a href because it must be text and it automatically change the cursor into hand

##### Share on other sites
Try javascript:void(0) and onClick!

< a href='javascript:void(0)' onClick='window.open()' > text < /a >

##### Share on other sites
you can also do:

< a href="#" target="_blank" > This will open a new window < /a >

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628290
• Total Posts
2981858

• 11
• 10
• 10
• 11
• 17