No if you try the two you will see that the broken page is different then the not broken page. The broken page that statement:
ctrlreset1.style.backgroundImage = 'url(\'reset03.gif\')'
is NOT being accessed. In the fixed one it is. Actually I fixed the issue just by switching which of these statements come first:
ctrlreset1.style.backgroundImage = 'url(\'reset03.gif\')'; ctrlUID.setAttribute('title','Enter your User ID',0);
broke.
ctrlUID.setAttribute('title','Enter your User ID',0); ctrlreset1.style.backgroundImage = 'url(\'reset03.gif\')';
fixed.
You know what I think the reason for it is. We must address elements in these events for controls in the order in which they occur from the top of the page down. In this case ctrlUID comes before ctrlreset1 in the page and the form. Thus if I am going to manipulate these controls in a javascript statement in one event, then the order in which this is done MUST correspond to the order in which they appear in the form from the top down. This example is proof of that.
My fixed one will not be uploaded. Just assurred it is fixed and done so by changing the order of the javascript statements in the onmousedown event for the reset button.
Sorry about the subject. I had started out the message and then redid the whole thing and forgot to change the subject.
--
George Hester
__________________________________
"Steve van Dongen" <st*****@hotmail.com> wrote in message news:ot********************************@4ax.com...
On Sun, 04 Jan 2004 04:47:08 GMT, "George Hester"
<he********@hotmail.com> wrote:
First working:
http://www27.brinkster.com/hesterloli1/
When you enter something in the User ID box and go to mousedown Reset you will find that the button depresses like a normal Dialog box's button should.
Second Broke:
http://www27.brinkster.com/hesterloli1/default1.asp
When you enter something in the User ID box and go to mousedown Reset you will find that the button does NOT depress like a normal Windows Dialog box's button should.
Why?
The first does not have the following in the onmousedown event of the <input id="reset1" ...> tag.:
ctrlUID.setAttribute('title','Enter your User ID',0);
where it comes after this statement:
ctrlreset1.style.backgroundImage = 'url(\'reset03.gif\')';
as the broken one does.
Why is this statement
ctrlUID.setAttribute('title','Enter your User ID',0);
interfering with this statement
ctrlreset1.style.backgroundImage = 'url(\'reset03.gif\')';?
Looks like a regular depressed button to me.
Use a meaningful subject line next time.
Regards,
Steve