...

View Full Version : onMouseover for link does not work?



binary0018
12-25-2006, 12:58 AM
Can someone pls advise me why this doesn't seem to work?

<a title="MyLink" href="http://www.theurl.com" onMouseover="window.location=this.href" target="_blank">

I'm trying to use onMouseover to open up the link in a new page, without the visitor having to actually click on the link itself.

I used this on a blog site.

So I'm not sure if is something inherently wrong with my inline-code.

Or could it be due to a master CSS (by the webmaster) which is overwriting inline onmouseover attributes?

TIA for any suggestions!

Arty Effem
12-25-2006, 03:31 AM
Can someone pls advise me why this doesn't seem to work?

<a title="MyLink" href="http://www.theurl.com" onMouseover="window.location=this.href" target="_blank">

I'm trying to use onMouseover to open up the link in a new page, without the visitor having to actually click on the link itself.

I used this on a blog site.

So I'm not sure if is something inherently wrong with my inline-code.

Or could it be due to a master CSS (by the webmaster) which is overwriting inline onmouseover attributes?

TIA for any suggestions!The target attribute is ignored because the link isn't being clicked, and the code you're executing is not associated with the operation of the link.

You could try: onMouseover="if(this.click)this.click()", but it's a silly thing to do in any case.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum