this is my javascript code. on load function i have to disable btndelete ..it works correct in iE but in firefox, buton is not dsabled..i dont know is this a css issue or what?
Javascript
window.onload = body_Onload;
function body_Onload()
{
var btnDelete = document.getElementById('<%=btnDelete.ClientID%>');
btnDelete.disabled = true;
}
HTML
<asp:Button ID="btnDelete" runat="server" CssClass="cssbutton" Text="Delete" Width="60px" OnClick="btnDelete_Click" />
CSS
.cssbutton
{
font-weight: bold;
border-right: #3C8FD1 1px solid;
border-top: #3C8FD1 1px solid;
border-left: #3C8FD1 1px solid;
border-bottom: #3C8FD1 1px solid;
font-size: 10px;
color: #045FA7;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
background-image: url(../App_Images/cssbuttonbg.gif);
line-height: 14px;
}
HTML Generated Code
<input type="submit" name="pageMain$contentPlaceHolderMain$btnDelete"
value="Delete" onclick="return btnDelete_Click();"
id="contentPlaceHolderMain_btnDelete" class="cssbutton" style="width:60px;"/>
Here is an example page I made, based on your question and the information in the comments:
This works in both IE and FireFox. The difference is, in IE the button is greyed out when disabled. In FireFox, the button looks the same, but is disabled. So you may want to assign a class to it and style that greyed out for FireFox.