View Single Post
  #3 (permalink)  
Old September 26th, 2006, 05:34 PM
aware aware is offline
Authorized User
 
Join Date: Jun 2003
Location: Bromsgrove, Worcestershire, United Kingdom.
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Joe, But....

I have tried something similar and it won't work, I have tried your code and get the same thing. The pages sort of stops and wont submit.

With your sample I can do an alert() and get all the right things, but the page stops at the line where we disable the image.

Here is my code, can you see anything wrong?

<input name="btnGo" id="btnGo" type="image" src="../images/SP_Save.gif" alt="Save Rating" onClick="return Validate()">


function Validate() {

    var ErrorMessage = '';

        if (document.frmRate.txtSDM.value == '') {
        ErrorMessage = ErrorMessage + 'SDM Approval\n';
        document.frmRate.txtSDM.className = 'Error';
        }

        document.getElementById("btnGo").disabled = true;

        return true;
        }
        else {
        alert(ErrorMessage);

        // Turn save btton back on if save cancelled
        document.getElementById("btnGo").disabled=false;

        return false;

        }
}

Reply With Quote