Hi all
I got a strange problem
In my webform, I have a server-side Button "btnDisable" to save some data and enable or disable all other fields in this form based on the data.
The logic is: on server click event, save data, write a client-side script to set 'ynDisable' to true or false, and then use general client-side code in window's onload event to disable all fields. The code is
function disableFields(
with (window.document
var iDocLen = all.length
for(var i = 0; i < iDocLen; i++
all(i).disabled = true
This code also disabled the Button "btnDisable". So I add one line of code to enable it
if (yndisable == true
disableFields()
window.document.getElementbyId("btnDisable").disab led = false
window.document.getElementbyId("btnDisable").value = "Enable"
Then the strangest thing happens. The server-side click event of btnDisable is not fired after clicking
In testing, if I don't call disableFields function, the event is fired
Or if I change to the following code
window.document.getElementbyId("btnDisable").disab led = true
window.document.getElementbyId("btnDisable").disab led = false
The click event is also fired
Do somebody know why
Bin Song, MCP