Its depending on your requirement, normally it should on onblur event.

On Thu, Oct 22, 2009 at 10:27 AM, talasan.nichol...@gmail.com <
talasan.nichol...@gmail.com> wrote:

>
> Is this on submit or live? I don't see how I'd use that.
>
> On Oct 20, 10:41 pm, Bi Jing <beco...@gmail.com> wrote:
> > You can set id attribute of <p> element, e.g. username_desc
> > And then using following script,
> > if(success){
> > $("#username_desc").html('default msg');}else{
> >
> > $("#username_desc").html('error msg');
> >
> > }
> >
> > Or you can add a new <p> used to show error message, toggle it between
> > default <p> on your validation result.
> >
> > Becoder.
> > On Wed, Oct 21, 2009 at 11:06 AM, talasan.nichol...@gmail.com <
> >
> > talasan.nichol...@gmail.com> wrote:
> >
> > > I don't really know where to start on this, but I need to take a form
> > > like:
> >
> > > <input name="username" type="text" id="username" />
> > > <p>input description</p>
> >
> > > And put an icon [the error label] next to input on success or fail;
> > > but also change the <p>'s text on success or fail.
> >
> > > So a fail would change the message to whatever the message was, and on
> > > success it would return it back to it's normal text.
> >
> > > Or to make it more simple, how can I change the <p>'s text but return
> > > it back to its default on success?
>

Reply via email to