Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change cursor within an area tag

Status
Not open for further replies.

jt8941

Programmer
Dec 9, 2003
15
US
I am trying to change the cursor when I hover over an item. With an href it does this automatically, however I am using javascript inside of my area tag to open the link in a new window. Any thoughts from anyone?
 
Code:
<a style="cursor: pointer;">blah blah</a>

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
 
That doesn't work inside of the area tag. Here is the code:

<map name="help">
<area shape="rect" coords="574,18,643,34" onClick="javascript:eek:cpHelp()">
<area shape="rect" coords="574,48,643,64" href="</map>

I have even tried setting the cursor the onMouseOver event but that doesn't work either
 
Oh, ok, I overlooked that aspect.

Just do this then:

Code:
<map name="help">
  <area shape="rect" coords="574,18,643,34" href="#" onClick="javascript:ocpHelp(); return false;">            
  <area shape="rect" coords="574,48,643,64" href="[URL unfurl="true"]http://xxx.xxx.com/logoff.cfm">[/URL]
</map>

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
 
k, just don't forget to [tt]return false[/tt] whenever you're using the onclick event for functionality, as I did above.

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top