Err. This was directed towards the if and else JS.

I'm already using the jQuery validator; and I've been through the docs
and can't find anything that would really do what I want it to.

The label will change, but I also need another element to change [the
fields description]

So the example would be like:

Username [field]
this is your login name

Then the user fills in the field and it returns invalid and it would
change to:

x Username: [field]
you've entered an invalid username

And if it's successful, then it would return

[checkmark] Username: [field]
this is your login name

Does that make sense?

On Oct 21, 9:27 pm, "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