Loading ...
Sorry, an error occurred while loading the content.

Re: OnMouseOver images and overlibmws together?

Expand Messages
  • Dawn B
    Thanks again... I ve changed my code, and the image is reverting like it s supposed to now... but the popup window is still sticking to my mouse until I
    Message 1 of 4 , Feb 28, 2005
    • 0 Attachment
      Thanks again...

      I've changed my code, and the image is reverting like it's supposed to
      now... but the popup window is still sticking to my mouse until I
      mouseover another popup link...

      [a href="index.html" onmouseover="document.welimg.src=wel_over.src;
      return overlib('*Welcome to our WebSite*', CAPTION, 'Hello!');"
      onmouseout=document.welimg.src=wel.src; nd();">[img width="150"
      height="65" src="img/welbutton.jpg" border="0" name="welimg"][/a]

      Dawn

      --- In overlibmws@yahoogroups.com, "Foteos Macrides" <fote@m...>
      wrote:
      > ----- Original Message -----
      > From: Dawn B
      > To: overlibmws@yahoogroups.com
      > Sent: Monday, February 28, 2005 9:18 PM
      > Subject: [OLmws] Re: OnMouseOver images and overlibmws together?
      >
      > Thanks Fote...
      >
      > I've got it so the images swap now, but when I move my mouse back
      off the image the image doesn't change back, and the popup stays stuck
      to the mouse until I move over another popup... is there a way to
      rectify this? (This is happening in both Mozilla 1.7 and IE6)
      >
      > Here's what I have in my header (replaced pointy brackets with
      square for the example)....
      >
      > [SCRIPT LANGUAGE="JavaScript" SRC="overlibmws.js"][/script]
      > [script type="text/javascript" src="overlibmws
      _shadow.js"][/script]
      > [script type="text/javascript"]
      > [!--
      > wel = new Image();
      > wel.src = "img/welbutton.jpg";
      > wel_over = new Image();
      > wel_over.src = "img/welbuttonon.jpg";
      > //--]
      > [/script]
      >
      > And in the body
      >
      > [a
      > href="index.html"
      > onmouseover="document.wel.src=wel_over.src;
      > return overlib('*Welcome to our WebSite*', CAPTION, 'Hello!');"
      > onmouseout=document.wel.src=wel.src; nd();"][img
      > width="150" height="65"
      > src="img/welbutton.jpg"
      > border="0"
      > name="wel"]
      >
      > Thanks,
      > Dawn
      >
      > Dawn,
      >
      > You have used the string "wel" for two different things, and thus
      created a name space collision. Use a different string for the name
      of the img element, e.g., "welimg" and then use
      "document.welimg.scr=wel_over.src" and "document.welimg.src="wel.src"
      for the onmouseover and onmouseout events, respectively.
      >
      > Fote
      > --
    • Foteos Macrides
      ... From: Dawn B To: overlibmws@yahoogroups.com Sent: Monday, February 28, 2005 11:25 PM Subject: [OLmws] Re: OnMouseOver images and overlibmws together?
      Message 2 of 4 , Mar 1 5:09 AM
      • 0 Attachment
        ----- Original Message -----
        From: Dawn B
        Sent: Monday, February 28, 2005 11:25 PM
        Subject: [OLmws] Re: OnMouseOver images and overlibmws together?
         
        Thanks again...

        I've changed my code, and the image is reverting like it's supposed to now... but the popup window is still sticking to my mouse until I mouseover another popup link...

        [a
          href="index.html"
          onmouseover="document.welimg.src=wel_over.src;
            return overlib('*Welcome to our WebSite*', CAPTION, 'Hello!');"  
          onmouseout=document.welimg.src=wel.src; nd();" >[img
          width="150" height="65"
          src="img/welbutton.jpg"
          border="0"
          name="welimg"][/a]

        Dawn
         
        Dawn,
         
        You do not have an open-double-quote following the equals-sign for the value of the onmouseout attribute.  So that value is treated as unquoted and thus is terminated by the parser at the next white space, which is just before the nd() call.  The nd() call and subsequent, unmatched, close-double-quote are treated as garbage by the parser and ignored.
         
        Add the open-double-quote so that the value for the onmouseout attribute is properly quoted.
         
        Fote
        --
         
      • Dawn B
        Ahh, thanks! It s working perfectly now. :) Dawn ... supposed to now... but the popup window is still sticking to my mouse until I mouseover another popup
        Message 3 of 4 , Mar 1 6:03 PM
        • 0 Attachment
          Ahh, thanks! It's working perfectly now. :)
          Dawn


          --- In overlibmws@yahoogroups.com, "Foteos Macrides" <fote@m...> wrote:
          > ----- Original Message -----
          > From: Dawn B
          > To: overlibmws@yahoogroups.com
          > Sent: Monday, February 28, 2005 11:25 PM
          > Subject: [OLmws] Re: OnMouseOver images and overlibmws together?
          >
          > Thanks again...
          >
          > I've changed my code, and the image is reverting like it's
          supposed to now... but the popup window is still sticking to my mouse
          until I mouseover another popup link...
          >
          > [a
          > href="index.html"
          > onmouseover="document.welimg.src=wel_over.src;
          > return overlib('*Welcome to our WebSite*', CAPTION, 'Hello!');"
          > onmouseout=document.welimg.src=wel.src; nd();" >[img
          > width="150" height="65"
          > src="img/welbutton.jpg"
          > border="0"
          > name="welimg"][/a]
          >
          > Dawn
          >
          > Dawn,
          >
          > You do not have an open-double-quote following the equals-sign for
          the value of the onmouseout attribute. So that value is treated as
          unquoted and thus is terminated by the parser at the next white space,
          which is just before the nd() call. The nd() call and subsequent,
          unmatched, close-double-quote are treated as garbage by the parser and
          ignored.
          >
          > Add the open-double-quote so that the value for the onmouseout
          attribute is properly quoted.
          >
          > Fote
          > --
        Your message has been successfully submitted and would be delivered to recipients shortly.