Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #14657 > unrolled thread
| Started by | Gene Wirchenko <genew@ocis.net> |
|---|---|
| First post | 2012-06-25 14:57 -0700 |
| Last post | 2012-06-26 16:36 -0700 |
| Articles | 5 — 2 participants |
Back to article view | Back to comp.lang.javascript
onmouseout Bug or Feature Gene Wirchenko <genew@ocis.net> - 2012-06-25 14:57 -0700
Re: onmouseout Bug or Feature "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-06-25 23:02 +0000
Re: onmouseout Bug or Feature Gene Wirchenko <genew@ocis.net> - 2012-06-25 17:11 -0700
Re: onmouseout Bug or Feature "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-06-26 22:03 +0000
Re: onmouseout Bug or Feature Gene Wirchenko <genew@ocis.net> - 2012-06-26 16:36 -0700
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-06-25 14:57 -0700 |
| Subject | onmouseout Bug or Feature |
| Message-ID | <pvmhu79f6at5pmli6h55p0qhtsemq5519i@4ax.com> |
Dear JavaScripters:
I have a question about onmouseout behaviour.
I am experimenting with HTTP requests. I have a simple page with
six images. On a mouseover, some appropriate text for that image is
supposed to be fetched from another site and displayed. On mouseout,
the text is erased.
When I see a changeState of 4, I check the status. I ignore a
1xx status, accept a 2xx, and throw an alert on anything else and then
display whatever data was returned.
With the site that I am testing against, their server being down,
I always get a 404 message. So on mouseover, first, the alert() is
displayed, then the 404 text is displayed.
Due to the alert(), the mouse cursor is no longer on the image so
mouseout technically has occurred. onmouseout does not fire. Is this
behaviour deliberate, a bug, or undefined as such?
Sincerely,
Gene Wirchenko
[toc] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2012-06-25 23:02 +0000 |
| Message-ID | <XnsA07EAA4BB549eejj99@194.109.133.133> |
| In reply to | #14657 |
Gene Wirchenko wrote on 25 jun 2012 in comp.lang.javascript: > Dear JavaScripters: > > I have a question about onmouseout behaviour. > > I am experimenting with HTTP requests. I have a simple page with > six images. On a mouseover, some appropriate text for that image is > supposed to be fetched from another site and displayed. On mouseout, > the text is erased. > > When I see a changeState of 4, I check the status. I ignore a > 1xx status, accept a 2xx, and throw an alert on anything else and then > display whatever data was returned. > > With the site that I am testing against, their server being down, > I always get a 404 message. So on mouseover, first, the alert() is > displayed, then the 404 text is displayed. > > Due to the alert(), the mouse cursor is no longer on the image so > mouseout technically has occurred. onmouseout does not fire. Is this > behaviour deliberate, a bug, or undefined as such? It is correct behavour,meseems. The problem is in your programming. You should not programme an alert() on Ajax error, when such alert() breaks wanted behavour. If a warning is necessary, you could display it in a span or div, perhaps a position fixed div mimicking an alert. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-06-25 17:11 -0700 |
| Message-ID | <kcvhu75inscmttvnjonsb6508lp94s0nap@4ax.com> |
| In reply to | #14659 |
On 25 Jun 2012 23:02:47 GMT, "Evertjan."
<exxjxw.hannivoort@inter.nl.net> wrote:
>Gene Wirchenko wrote on 25 jun 2012 in comp.lang.javascript:
[snip]
>> Due to the alert(), the mouse cursor is no longer on the image so
>> mouseout technically has occurred. onmouseout does not fire. Is this
>> behaviour deliberate, a bug, or undefined as such?
>
>It is correct behavour,meseems.
>
>The problem is in your programming.
>
>You should not programme an alert() on Ajax error,
>when such alert() breaks wanted behavour.
>
>If a warning is necessary, you could display it in a span or div,
>perhaps a position fixed div mimicking an alert.
Experimental code. Must easier to throw in an alert(). Another
case of debugging changing program behaviour.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2012-06-26 22:03 +0000 |
| Message-ID | <XnsA07F97D7412eejj99@194.109.133.133> |
| In reply to | #14660 |
Gene Wirchenko wrote on 26 jun 2012 in comp.lang.javascript: > On 25 Jun 2012 23:02:47 GMT, "Evertjan." > <exxjxw.hannivoort@inter.nl.net> wrote: > >>Gene Wirchenko wrote on 25 jun 2012 in comp.lang.javascript: > > [snip] > >>> Due to the alert(), the mouse cursor is no longer on the image so >>> mouseout technically has occurred. onmouseout does not fire. Is this >>> behaviour deliberate, a bug, or undefined as such? >> >>It is correct behavour,meseems. >> >>The problem is in your programming. >> >>You should not programme an alert() on Ajax error, >>when such alert() breaks wanted behavour. >> >>If a warning is necessary, you could display it in a span or div, >>perhaps a position fixed div mimicking an alert. > > Experimental code. Must easier to throw in an alert(). Another > case of debugging changing program behaviour. Ok. It could break you up in time or mouse-position critical applications. Continuing after a breakpoint usually is not advisable in these cases, try: alert( 'breakpoint 3, the value of a being: ' + a ); stopMeNow() where stopMeNow() is not a defined function. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-06-26 16:36 -0700 |
| Message-ID | <4khku7h4ok5eo1c94h3on2jblu0oj0o0ng@4ax.com> |
| In reply to | #14695 |
On 26 Jun 2012 22:03:30 GMT, "Evertjan."
<exxjxw.hannivoort@inter.nl.net> wrote:
>Gene Wirchenko wrote on 26 jun 2012 in comp.lang.javascript:
[snip]
>> Experimental code. Must easier to throw in an alert(). Another
>> case of debugging changing program behaviour.
>
>Ok.
>
>It could break you up in time or mouse-position critical applications.
>
>Continuing after a breakpoint usually is not advisable in these cases, try:
I was looking at what was getting returned and not necessarily
wanting it to stop.
>alert( 'breakpoint 3, the value of a being: ' + a ); stopMeNow()
>
>where stopMeNow() is not a defined function.
Thank you. When I was starting out in JavaScript, I ran into so
many problems with weird errors causing my code to crash with an error
that I did not even think of this. (Said weird errors being due to my
mistyping or misunderstanding. It is much easier now.)
Added back into JavaScript arsenal. Ka-CLICK!
Sincerely,
Gene Wirchenko
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web