By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,528 Members | 1,345 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,528 IT Pros & Developers. It's quick & easy.

cursor lost it hand

P: n/a
Hi All

I have a few

onclick="javascript:poptastic('http://dominatesoftware.com/main.php','height=430,width=400,resizable=1,scroll bars=1,toolbar=1');"

calls in several html files. The function looks like this
var newwindow;
function poptastic(url,stuff)
{
newwindow=window.open(url,'name',stuff);
if (window.focus) {newwindow.focus()}
}

My problem is the cursor doesn't change to the hand so my users may not
realize there is a link there. I think it is because the javascript doesn't
produce a HREF tag

Is there some way to get a onmouseover thingy to fix this

Yes I'm new to javascript

Len Bell
Jun 27 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
lenbell wrote on 27 mei 2008 in comp.lang.javascript:
Hi All

I have a few

onclick="javascript:poptastic('http://dominatesoftware.com/main.php','h
eight=430,width=400,resizable=1,scrollbars=1,toolb ar=1');"
the javascript: part is nonsense, trow it avaw.

calls in several html files. The function looks like this
var newwindow;
function poptastic(url,stuff)
{
newwindow=window.open(url,'name',stuff);
if (window.focus) {newwindow.focus()}
}

My problem is the cursor doesn't change to the hand so my users may
not realize there is a link there. I think it is because the
javascript doesn't produce a HREF tag
Should it?
You firat have to produce an html element that understands href=.
href is not a tag, btw.
Is there some way to get a onmouseover thingy to fix this

Yes I'm new to javascript
Better read up on CSS styles, that's where you change the cursor.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jun 27 '08 #2

P: n/a

"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
lenbell wrote on 27 mei 2008 in comp.lang.javascript:
>Hi All

I have a few

onclick="javascript:poptastic('http://dominatesoftware.com/main.php','h
eight=430,width=400,resizable=1,scrollbars=1,tool bar=1');"

the javascript: part is nonsense, trow it avaw.

>calls in several html files. The function looks like this
var newwindow;
function poptastic(url,stuff)
{
newwindow=window.open(url,'name',stuff);
if (window.focus) {newwindow.focus()}
}

My problem is the cursor doesn't change to the hand so my users may
not realize there is a link there. I think it is because the
javascript doesn't produce a HREF tag

Should it?
You firat have to produce an html element that understands href=.
href is not a tag, btw.
>Is there some way to get a onmouseover thingy to fix this

Yes I'm new to javascript

Better read up on CSS styles, that's where you change the cursor.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Not really a CSS problem at all. I don't want it to change cursors on every
image, just the ones that have this "poptastic" attached to the onClick
event

The problem is that the html has no HREF tag so it does not change the cusor
shape to the hand - indicating a link.

I need and can not find a javascript to attach to the onMouseOver event

Len Bell
Jun 27 '08 #3

P: n/a
lenbell meinte:
"Evertjan." <ex**************@interxnl.netwrote in message
>Better read up on CSS styles, that's where you change the cursor.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Please don't quote signatures.
Not really a CSS problem at all. I don't want it to change cursors on every
image, just the ones that have this "poptastic" attached to the onClick
event

The problem is that the html has no HREF tag so it does not change the cusor
shape to the hand - indicating a link.

I need and can not find a javascript to attach to the onMouseOver event
Huh?

onmouseover="this.style.cursor='pointer'"

Gregor

--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum
Jun 27 '08 #4

P: n/a
[snipped attribution novel]

lenbell wrote:
"Evertjan." <ex**************@interxnl.netwrote [...]:
>lenbell wrote on 27 mei 2008 in comp.lang.javascript:
>>I have a few

onclick="javascript:poptastic('http://dominatesoftware.com/main.php','h
eight=430,width=400,resizable=1,scrollbars=1,too lbar=1');"
[...]
My problem is the cursor doesn't change to the hand so my users may
not realize there is a link there.
Because there isn't any.
>>I think it is because the javascript doesn't produce a HREF tag
Should it?
You firat have to produce an html element that understands href=.
href is not a tag, btw.
>>Is there some way to get a onmouseover thingy to fix this

Yes I'm new to javascript
Better read up on CSS styles, that's where you change the cursor.
[...]

Not really a CSS problem at all. I don't want it to change cursors on every
image, just the ones that have this "poptastic" attached to the onClick
event
Make them links; don't make the other ones links.
The problem is that the html has no HREF tag so it does not change the cusor
shape to the hand - indicating a link.
Again, `href' is not a tag. It is an attribute of `a' elements, among
others. When used with an `a' element, that makes this element a (hyper)link.

A tag instead is a part of an element: <pis the start tag of the `p'
element, for example.

See also http://www.w3.org/TR/REC-html40/intr...t.html#h-3.2.1
I need [...] a javascript to attach to the onMouseOver event
No, you don't. Instead you need a minimum clue about HTML and client-side
scripting, and how to use both to create Web sites that degrade gracefully,
before you continue.

<script type="text/javascript">
function isMethod(o, p)
{
return o && /\b(function|object|unknown)\b/i.test(typeof o[p])
&& o[p];
}

function poptastic(url, options)
{
if (isMethod(window, "open"))
{
var w = window.open(url, "poptastic", options);
if (isMethod(w, "focus")) w.focus();
}

return !w;
}
</script>

<a href="http://dominatesoftware.com/main.php"
onclick="return poptastic(this.href,
'height=430,width=400,resizable,scrollbars,toolbar ');"
>...</a>

PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Jun 27 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.