asp and javascript

Results 1 to 2 of 2

Thread: asp and javascript

  1. #1
    martinsimard Guest

    Default asp and javascript

    How to do that:<BR>I have a javascript function in my asp page and i try to do a ASP date validation (IsDate) inside of my javascript function but i cannot do it with my session variable... I got when i try to do it an error (NaN) when MyDate is like 11/11/00... It&#039s work fine if i declare a variable and hardcode the string for the date but the values are from an Input text. Trying to use Request or Session give me same NaN (not a number).<BR>My question is that is it possible to pass asp values (Input text) inside a javascipt function (validation)<BR>and return a value (false/true) from javascipt to asp variable.<BR>It&#039s could be a simple answer for my question but... Thank&#039s anyway and all answer are welcome!!

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default BAck to basics

    First thing you should understand and putting it simple is that the ASP code FIRST gets executed and only then will all the client side script be executed. So if you put a isdate(user input) it will give and error cause the value is empty at the tim the ASP script is executing. <BR><BR>YOu will have to write a javascript function to check if the date is valid and NOT use isdate() inside the function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts