Erik- Nope I'm just looking for a way to stop the user from editing the field. Setting it to readonly is good and the css will be a nice visual cue.
Thanks. On Aug 26, 11:19 pm, "Erik Beeson" <[EMAIL PROTECTED]> wrote: > > Ajax validation. If it's validated then I need to disabled or hide > > it so the user can't edit it. Problem with disabled is that when the > > form is submitted disabled field doesn't get submitted. > > You can make it read only, and maybe make the text gray so it's a > little clearer that it can't be edited: > > $('#inputID').attr('readonly', 'readonly').css('color', '#999'); > > If you really want to "convert" it to hidden, just make a new hidden > element and copy over the name and value properties. > > --Erik