...

View Full Version : JavaScript: onclick=hide the caller



MichaelCL
12-30-2006, 11:53 PM
Hi!

this:

<input type="button" onmouseup="this.style.display='none';" value="clickMe" />

causes IE to stop responding to (nearly) all mouse input. Including IE's own menu bar. Reloading the page stops the problem. Generating virtual clicks on other objects does not.

Does anybody here understand why this happens and how I can prevent it from happening? I realise the form presented here has no use whatsoever but on my page it makes sense ;)

Arty Effem
12-31-2006, 01:23 AM
Hi!

this:

<input type="button" onmouseup="this.style.display='none';" value="clickMe" />

causes IE to stop responding to (nearly) all mouse input. Including IE's own menu bar. Reloading the page stops the problem. Generating virtual clicks on other objects does not.

Does anybody here understand why this happens and how I can prevent it from happening? I realise the form presented here has no use whatsoever but on my page it makes sense ;)Seems to be just the mouseup event. It's O.K. using onclick or onmousedown. Do you need to use mouseup?

MichaelCL
12-31-2006, 01:34 AM
:o

I never even thought of that...

I guess onclick will just have to do :)
Thanks! I started using onmouseup because someone suggested this would give you the ability to cancel clicks by holding the button down, moving the cursor off the button and then releasing again. But as far as I can see that functionality is already present... Leaves me wondering what mouseup is for then

Thanks!

david_kw
12-31-2006, 02:55 AM
mouseup is useful for drag and drop.

david_kw



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum