hi thanks for the quick code but this does not seem to evaluate if i
enter a number.

see code below


$("#searchForm input.submitBtn").click(function(e){

                var EnteredValue = $.trim($("#keywords").val());

                var TestValue = EnteredValue.replace(" ", "");

                alert(EnteredValue);
                alert(TestValue);

                 if (isNaN(TestValue)) {

                         alert("is a letter")
           return EnteredValue;  // User must have entered a keyword

                }
        else

                return TestValue;        // Prodict code minus all spaces
                         alert("is a number")


        })


On Sep 16, 4:14 pm, MorningZ <[EMAIL PROTECTED]> wrote:
> Totally off the top of my head (and therefore totally untested, but it
> should be good)
>
> var EnteredValue = $.trim($("#SearchText").val());
> var TestValue = EnteredValue.replace(" ", "");
> if (isNaN(TestValue)) {
>      return EnteredValue;  // User must have entered a keyword}
>
> else {
>      return TestValue;        // Prodict code minus all spaces
>
> }

Reply via email to