Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1784 Can I create a link without having a hand pointer?

irt.org | Knowledge Base | JavaScript | Mouse | Q1784 [ previous next ]

Q1784 Can I create a link without having a hand pointer?

Instead of creating the link with an html anchor, use onClick="window.open(...)" within a <span>, <div>, <p>, etc. tag (for text). Unless you also specify a particular cursor style, the pointer will behave as if it's ordinary text.

<span onClick=self.location.href="nextpage.html">
Click here to load into the same window
</span>

<div onClick=window.open('nextpage.html','title','')>
Click here to open a new window
</div>

It works with images, too...

<img src="linkpic.jpg" onClick=self.location.href="nextpage.html">

This makes the pointer an hourglass...

<span onClick=self.location.href="nextpage.html" style="cursor:wait">
Click here to load into the same window
</span>

Submitted by Mister Wags


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.