This is driving me nuts. This script executes fine in IE, but in FF I get this error "document.getElementById(buttonID2).fireEvent is not a function". When I remove the underscores from the submitButton id's I don't get any error messages, but then it doesn't work in IE or FF. Is it the .fireEvent in FF, should I use dispatchEvent?
<script language="javascript">
// disable button and submit form
if(document.getElementById("submitButton2_")){
var buttonId2=document.getElementById("submitButton2_").title;
document.getElementById(buttonId2).fireEvent("onclick");
}
if(document.getElementById("submitButton1_")){
var buttonId2=document.getElementById("submitButton1_").title;
document.getElementById(buttonId2).fireEvent("onclick");
}
</script>
<script language="javascript">
// disable button and submit form
if(document.getElementById("submitButton2_")){
var buttonId2=document.getElementById("submitButton2_").title;
document.getElementById(buttonId2).fireEvent("onclick");
}
if(document.getElementById("submitButton1_")){
var buttonId2=document.getElementById("submitButton1_").title;
document.getElementById(buttonId2).fireEvent("onclick");
}
</script>