SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: onMouseOut?

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    BOSTON
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    onMouseOut?

    good afternoon forumers!
    hope everyone is enjoying their thursday!
    now to bidness...
    I have constructed a DHTML web editor, and it is working fine using many of the the components from my own scripting and some of the MSHMTL COMs. Now, everything is working fine,... except within the editing content component, i have a bunch of div's that call javascript functions to do various things including save,... insert tables... whatever!
    and they all work... but if i onClick a div,hold the button move off of the div and onMouseUp,I get an error message comes up saying:
    A Runtime Error has occurred.
    Line 395
    Error: 'className' is null or not an object

    now... am i right when i say the error is coming from the appropriate onMouseUp function not being sent anything and it is trying to set it to className??
    I mean i don't have a className! SO WHAT IS IT???
    Basicly some one is either going to know what i am talking about, or have some low level .js include experience with the DHTML editing component

    i have listed the sdk for anyone that needs a "refresher":
    http://msdn.microsoft.com/archive/de...dhtmledcom.asp

    ANY input is appreciated
    thanks a bunch
    PEACE

  2. #2
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As an experiment try and change the onclick to onmousedown. I assume you are trying to create a drag and drop affect or else you were just playing around and found the error ...

    If you really want to learn a lot about advanced method handling, which is far more than I could explain in one message, try here

    http://www.webreference.com/js/column74/

    That article will lead you to other browsers involved in the event tree
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Location
    BOSTON
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    morning!

    hey, thanks for replying maelstrom!

    you are correct in saying that i found the error when i was doing something else,... the button that i discovered the bug on doesn't as of yet have fully functionality, and requires some procedure to make it work, and sometimes i get ahead of myself after editing code and click on it before a refresh.. when i do,.. sometimes i catch myself and i can drag the mouse off the div, and then release the click button
    then i get that darn className error message!

    thanks for the link tho! i use Doc Javascript articles all of the time, his recent set of SOAP articles are incredibly handy! When i find out where the null object is i will let ya know!

    thanks again!
    PEACE

  4. #4
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: morning!

    No problem. I think it is because you onmouseover something it captures that element. When you onmouseout it has no element. To see what I mean try this

    Code:
    <table border=1>
    	<tr>
    		<td onmousedown="document.getElementById('test').innerHTML='mousedown'">testing onmousedown</td>
    	</tr>
    	<tr>
    		<td onmouseup="document.getElementById('test').innerHTML='mouseup'">testing onmouseoff</td>
    	</tr>
    </table>
    <div id="test">
    </div>
    If you simply click on the first row you will capture the onclick if you hold the mouse button down and move the mouse down to the second element and release you capture both events.

    This is kind of why I think your problem is associated with how and when you are capturing your events. Or else you just found a bug in the javascript event system
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •