I got a weird effect firing off a JS event on a onClick event in vb.net.
I have this line in my html:
<div align="center" id="divPleaseWait" style="VISIBILITY:hidden">Please Wait</div>
Then this in .vb to make it active:
dlMeters.Attributes.Add("onClick", "JavaScript:doPleaseWait();")
The function doPleaseWait does this:
function doPleaseWait(){
document.getElementById('divPleaseWait').style.visibility = 'visible';
}
However on any of the buttons/links/datalists I add this event to, the first click doesn't make the text in div tag appear, however, every click thereafter on the same button/link/datalist works fine.
Whats going on?
I have this line in my html:
<div align="center" id="divPleaseWait" style="VISIBILITY:hidden">Please Wait</div>
Then this in .vb to make it active:
dlMeters.Attributes.Add("onClick", "JavaScript:doPleaseWait();")
The function doPleaseWait does this:
function doPleaseWait(){
document.getElementById('divPleaseWait').style.visibility = 'visible';
}
However on any of the buttons/links/datalists I add this event to, the first click doesn't make the text in div tag appear, however, every click thereafter on the same button/link/datalist works fine.
Whats going on?