Thread: Java script

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    6
    Rep Power
    0

    Java script


    Dear friends

    can you please support on the below script ,
    it is triggering the alert even if it = true .

    $("#FormSubmit").click(function (e) {
    e.preventDefault();
    if($("#contentText").val()==='')
    {
    alert("Account Number cannot be empty!");
    return false;
    }
    else if (isNaN($("#contentText").value)) {
    alert("The phone number contains illegal characters.");
    return false;
    }


    please help
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    6
    Rep Power
    0
    thanks i solve it

    Code:
    else if (isNaN($("#contentText").val()))



    Originally Posted by albattashi
    Dear friends

    can you please support on the below script ,
    it is triggering the alert even if it = true .

    $("#FormSubmit").click(function (e) {
    e.preventDefault();
    if($("#contentText").val()==='')
    {
    alert("Account Number cannot be empty!");
    return false;
    }
    else if (isNaN($("#contentText").value)) {
    alert("The phone number contains illegal characters.");
    return false;
    }


    please help

IMN logo majestic logo threadwatch logo seochat tools logo