Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #8005
| Message-ID | <8926926.SEqChMirdb@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2011-11-04 21:09 +0100 |
| Subject | Re: Where to start looking (AJAX related) |
| Newsgroups | comp.lang.javascript |
| References | <4eb4154c$0$6900$e4fe514c@news2.news.xs4all.nl> |
| Followup-To | comp.lang.javascript |
Followups directed to: comp.lang.javascript
Your Subject header field value is suboptimal. It should *describe* the
problem you are having/the content of the posting succinctly, not forestall
the question.
Tom de Neef wrote:
> I have a problem with a server-generated page - sometimes the menu stops
> responding
Which means?
> By removing items I have isolated the problem. For the simplified
> situation I have found a work-around but I do not understand
> why the work-around is different from the original.
>
> The html contains a table:
> <table><tr><td id="MENU_1">menu</table>
>
> In the body.onload the following code is called:
> document.getElementById("MENU_1").style.cursor = "pointer"
What do you mean by that?
> This is my way to test - does the cursor change to a handpointer when
> moving over the table cell. It does.
> Until a processAjaxEvent call is processed that affects some aspect of a
> <div> (visibility, color, position, etc).
What "<div>"?
> Thereafter the cursor will no longer change into a handpointer when moving
> over the table cell. (And in the real app also the cell's events are
> lost.)
So, what is the value of the `cursor' property then? And what does this
have to do with your real problem, the "not responding" menu?
> Now the workaround. That is to scrap the javascript code in the onload
> handler but add the style information directly to the html:
There is no "javascript".
> <table><tr><td id="MENU_1" style="cursor:pointer">menu</table>
>
> The cursor is no longer affected by the Ajax call; it does change as
> intended.
There is no "Ajax call".
> So my question is: what is the fundamental difference between setting an
> attribute in the html source or via a javascript call?
Assigning to a property of the object referred to by the `style' property of
a HTML DOM element object should be equivalent to declaring a CSS property
in the `style' attribute of the element that is represented by the element
object, with the the assigned value.
The problem must be elsewhere.
The code on top also is no call in the end, but a property assignment.
> Is the described behaviour understandable without diving into the Ajax
> code?
No.
> If so, can you explain that to me.
That is not a question.
PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7@news.demon.co.uk> (2004)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Where to start looking (AJAX related) "Tom de Neef" <tdeneef@qolor.nl> - 2011-11-04 17:39 +0100
Re: Where to start looking (AJAX related) "Tom de Neef" <tdeneef@qolor.nl> - 2011-11-04 19:47 +0100
Re: Where to start looking (AJAX related) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-11-04 21:09 +0100
Re: Where to start looking (AJAX related) "Tom de Neef" <tdeneef@qolor.nl> - 2011-11-04 22:38 +0100
csiph-web