On 4/17/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:

> You would probably need to return a more complex object from the
> server that contained a boolean in addition to your text.  Structures
> and JSON/WDDX work well for that kind of thing.  You would then use
> the boolean to trigger an if () statement.

Ummm.... could you elaborate a little on that?  :o)

I tried the code of Sean, and it's ok, and I also can use this:

<script type="text/javascript">

 var enabled = true;
 toggleSubmit = function(form){
   if(enabled)
     $("input:submit",form).attr("disabled",true);
   else
     $("input:submit",form).attr("disabled",false);
   enabled = !enabled;
 }

</script>

I use true or false, it's the same with 'disabled' or "". I tested it
in IE 6.0 and FF 2.0. jquery 1.1.2

--
I like python!
UliPad <<The Python Editor>>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

Reply via email to