Cannot get disable button to work.
- by Scarface
Hey guys, quick question, I have this javascript/jquery function that basically wraps an input in image brackets, and the first part of the function works, but the button does not disable after and I cannot figure out why (last line does not work). If anyone has an idea, let me know. Thanks in advance.
<input id="2image" type="button" value="Attach" onclick="imageid('message')">
<script>
function imageid(input) {
var obj=document.getElementById(input);
obj.value+="[image]image[/image]";
$("#2image").attr({ disabled:true, value:"Inserted" });
}
</script>