T
Tom de Neef
I have a problem with a server-generated page - sometimes the menu stops
responding. 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"
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).
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.)
Now the workaround. That is to scrap the javascript code in the onload
handler but add the style information directly to the html:
<table><tr><td id="MENU_1" style="cursorointer">menu</table>
The cursor is no longer affected by the Ajax call; it does change as
intended.
So my question is: what is the fundamental difference between setting an
attribute in the html source or via a javascript call?
Is the described behaviour understandable without diving into the Ajax code?
If so, can you explain that to me.
Thank you,
Tom
responding. 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"
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).
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.)
Now the workaround. That is to scrap the javascript code in the onload
handler but add the style information directly to the html:
<table><tr><td id="MENU_1" style="cursorointer">menu</table>
The cursor is no longer affected by the Ajax call; it does change as
intended.
So my question is: what is the fundamental difference between setting an
attribute in the html source or via a javascript call?
Is the described behaviour understandable without diving into the Ajax code?
If so, can you explain that to me.
Thank you,
Tom