[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>