validation in asp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jats
    New Member
    • Sep 2008
    • 2

    validation in asp

    Hi,
    i am giving validation in my asp page on the onkeypress ="return zipcode(this)" of textarea


    Code:
    function zipcode(e)
    {
    var keycode;
    
    if (window.event) keycode = window.event.keyCode;
    else if (event) keycode = event.keyCode;
    
    else if (e) keycode = e.which;
    
    else return true;if( (keycode >= 65 && keycode <= 90) || (keycode >= 97 && keycode <= 122)||(keycode == 96)||(keycode == 39)||(keycode >= 48 && keycode <= 57))
    {
    return true;
    }
    else
    
    {
    return false;
    
    }
    return true;
    }

    its running good in Internet explorer.
    but it is not working in FIREFOX

    any Suggestion , or experience with this kind of problem

    thanks in advance
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    Hi jats,

    FireBug is a great FireFox add on which enables you to debug Javascript. I'd suggest downloading it and using it to try and debug your code.

    Let me know how it goes.

    Dr B

    Comment

    Working...