That's awesome! Just what I was looking for.

In addition to that i also want to make the field required, so if they don't
choose an asterix field, it's not required but if they do then i want them
to fill in the additional field.

Not sure how to merge your solution with the jquery Validation code. Any
ideas?

On Mon, Apr 28, 2008 at 10:44 PM, Wil Everts <[EMAIL PROTECTED]> wrote:

> Mark,
>
> Here's some general sketching to help you along. There are likely
> other/better ways to go about this, but this should work out for you.
>
> Where "selectVar" is the id of the select box:
>
> $j("#selectVar").change( function() {   // when something is selected run
> this
>
>   var containsStar = $j("#selectVar").val().indexOf('*');
>   /* if var mynewvar = 'bobx*' containsStar would = 4
>      if var mynewvar = 'bobx' containsStar would = -1 */
>
>   if (containsStar >= 0) {
>     $(".additionalInput").show();
>   }
>
> });
>
>
> Kindest,
>
> Wil Everts
> [EMAIL PROTECTED]
>
>
> On Mon, Apr 28, 2008 at 1:57 PM, RevolveGuy <[EMAIL PROTECTED]>
> wrote:
>
> >
> > I am using JQuery Validation and I'm trying to make a selection box
> > that has several items, some of which have a * at the end, if you
> > select one of those options then i want the next text field to become
> > active. Anyone got any idea how to do this?
> >
>


-- 
Mark Clemons
[EMAIL PROTECTED]

Reply via email to