Sorry for ~spam, I found that adding the onclick to the parent element (a TD
fortunately) is a good enough solution in this situation.
BTW: The behaviour is slightly different in IE7 vs Fx2:
in IE the click passes through the input, but in Fx the click must be in
the TD, outside the input.
jazzle wrote:
>
> I have discovered that if an input is disabled all its events are as well.
>
> For example
> <input type="text" disabled="disabled" onclick="alert('x');" />
> won't work.
>
> I have an input like this and want it disabled (to prevent it being
> posted) unless the user wants to change the value.
> I thought I could simple use
> <input type="text" disabled="disabled"
> onclick="$(this).removeAttr('disabled');" />
> or it might need
> <input type="text" disabled="disabled" id="x"
> onclick="$('#x').removeAttr('disabled');" />
>
> But alas, no luck.
>
> Is there some way to force an onclick to work in this situation?
>
--
View this message in context:
http://www.nabble.com/Allow-onclick-%28etc%29-on-disabled-input-tf2594290.html#a7235866
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/