[Javascript] type="image"
Paul Novitski
paul at juniperwebcraft.com
Thu Jul 6 16:32:21 CDT 2006
At 01:55 PM 7/6/2006, Muñoz Peñaloza Carlos Alberto wrote:
>Hi list, i have a problems, how disabled a
>button the type=image, for example:
>
>
>Function disabled_btn()
>{
>Document.form1.imgaceptar.disable=false;
>}
>
><form name=form1>
><input type="image" name="imgaceptar"
>id="imgaceptar" src="..\images\btnguardar.GIF" alt="" border="0" />
></form>
I think you want:
oButton.disabled = true;
where oButton is the input element. If you pass
the element's id to the function, you can write, for example:
function disable_btn(sButtonName)
{
if (document.getElementById) var oButton
= document.getElementById(sButtonName);
if (oButton) oButton.disabled = true;
}
Paul
More information about the Javascript
mailing list