cursor lost it hand

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lenbell

    cursor lost it hand

    Hi All

    I have a few

    onclick="javasc ript:poptastic( 'http://dominatesoftwar e.com/main.php','heig ht=430,width=40 0,resizable=1,s crollbars=1,too lbar=1');"

    calls in several html files. The function looks like this
    var newwindow;
    function poptastic(url,s tuff)
    {
    newwindow=windo w.open(url,'nam e',stuff);
    if (window.focus) {newwindow.focu s()}
    }

    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


  • Evertjan.

    #2
    Re: cursor lost it hand

    lenbell wrote on 27 mei 2008 in comp.lang.javas cript:
    Hi All
    >
    I have a few
    >
    onclick="javasc ript:poptastic( 'http://dominatesoftwar e.com/main.php','h
    eight=430,width =400,resizable= 1,scrollbars=1, toolbar=1');"
    the javascript: part is nonsense, trow it avaw.

    calls in several html files. The function looks like this
    var newwindow;
    function poptastic(url,s tuff)
    {
    newwindow=windo w.open(url,'nam e',stuff);
    if (window.focus) {newwindow.focu s()}
    >}
    >
    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)

    Comment

    • lenbell

      #3
      Re: cursor lost it hand


      "Evertjan." <exjxw.hannivoo rt@interxnl.net wrote in message
      news:Xns9AABD19 587B34eejj99@19 4.109.133.242.. .
      lenbell wrote on 27 mei 2008 in comp.lang.javas cript:
      >
      >Hi All
      >>
      >I have a few
      >>
      >onclick="javas cript:poptastic ('http://dominatesoftwar e.com/main.php','h
      >eight=430,widt h=400,resizable =1,scrollbars=1 ,toolbar=1');"
      >
      the javascript: part is nonsense, trow it avaw.
      >
      >
      >calls in several html files. The function looks like this
      >var newwindow;
      >function poptastic(url,s tuff)
      >{
      > newwindow=windo w.open(url,'nam e',stuff);
      > if (window.focus) {newwindow.focu s()}
      >>}
      >>
      >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


      Comment

      • Gregor Kofler

        #4
        Re: cursor lost it hand

        lenbell meinte:
        "Evertjan." <exjxw.hannivoo rt@interxnl.net wrote 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="th is.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

        Comment

        • Thomas 'PointedEars' Lahn

          #5
          Re: cursor lost it hand

          [snipped attribution novel]

          lenbell wrote:
          "Evertjan." <exjxw.hannivoo rt@interxnl.net wrote [...]:
          >lenbell wrote on 27 mei 2008 in comp.lang.javas cript:
          >>I have a few
          >>>
          >>onclick="java script:poptasti c('http://dominatesoftwar e.com/main.php','h
          >>eight=430,wid th=400,resizabl e=1,scrollbars= 1,toolbar=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|obj ect|unknown)\b/i.test(typeof o[p])
          && o[p];
          }

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

          return !w;
          }
          </script>

          <a href="http://dominatesoftwar e.com/main.php"
          onclick="return poptastic(this. href,
          'height=430,wid th=400,resizabl e,scrollbars,to olbar');"
          >...</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>

          Comment

          Working...