Check out this demo, Daemach, which uses Sean's
code below:

http://bodaford.whitestonemedia.com/html/test_toggle_submit_button.cfm

Rick



-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Daemach
Sent: Monday, April 16, 2007 10:11 PM
To: jQuery (English)
Subject: [jQuery] Re: Will this code enable & disable a submit button?


Actually to re-enable a disabled element you need to remove the
disabled attribute altogether - use:

 $(form).find("[EMAIL PROTECTED]").removeAttr("disabled");  or  $
("input:submit").removeAttr("disabled"); for short.

On Apr 16, 9:42 am, "Rick Faircloth" <[EMAIL PROTECTED]> wrote:
> Hi, all...
>
> Will the "onInvalid" and "onValid" lines in the code below work
> to enable & disable a submit button?
>
> Rick
>
>         $(document).ready(function(){
>
>             onInvalid: function(form) {
>              $(form).find("[EMAIL PROTECTED]").attr("disabled",
> "disabled");
>              };
>
>         onValid: function(form) {
>              $(form).find("[EMAIL PROTECTED]").attr("disabled", "");
>              };
>
>                 $("#Principal").blur(function(){
>                 $.post("callpage_Validate_Mortgage_Inputs.cfm",
> {principal:$("#Principal").val()},
>                 function (data)
{$("#Result_Principal").empty().append(data)
>
> } ) });
>
>                 $("#Interest").blur(function(){
>                 $.post("callpage_Validate_Mortgage_Inputs.cfm",
> {interest:$("#Interest").val()},
>                 function (data)
{$("#Result_Interest").empty().append(data)
>
> }) });
>
>                 $("#Years").blur(function(){
>
> $.post("callpage_Validate_Mortgage_Inputs.cfm",{years:$("#Years").val()},
>                 function (data) {$("#Result_Years").empty().append(data)
})
>
> });
>
>                 $("#Calculate").click(function() { return
> CalculateMortgage(); });
>
>         });



Reply via email to