[jQuery] Re: Nesting if statements not working

2008-09-02 Thread hubbs
Thanks guys, this fixed it! On Sep 1, 6:37 pm, Jason Huck <[EMAIL PROTECTED]> wrote: > One thing I would suggest is casting the .val() as an integer before > comparing it: > >     var dulicateCheck = parseInt($("#duplicateInput").val()); > > Otherwise it's doing a string comparison, which will th

[jQuery] Re: Nesting if statements not working

2008-09-01 Thread Jason Huck
One thing I would suggest is casting the .val() as an integer before comparing it: var dulicateCheck = parseInt($("#duplicateInput").val()); Otherwise it's doing a string comparison, which will throw off your results. - jason On Sep 1, 9:25 pm, hubbs <[EMAIL PROTECTED]> wrote: > For some

[jQuery] Re: Nesting if statements not working

2008-09-01 Thread Karl Rudd
Just off the top of my head, the val() function returns a string, not a number. Convert the string to a number (parseInt() or parseFloat()) and things should work better. Karl Rudd On Tue, Sep 2, 2008 at 11:25 AM, hubbs <[EMAIL PROTECTED]> wrote: > > For some reason, when I am nesting if stateme