Java Script help

Results 1 to 3 of 3

Thread: Java Script help

  1. #1
    Sid Guest

    Default Java Script help

    In a javascript function I assigned date like below. Can I do like this? <BR><BR>if (btnObj.form.SN_Status.value == "C") <BR>{ <BR>var eDate = cstr(Request.Form("EndYear"))+"/"+cstr(Request.Form("EndMonths"))+"/"+cstr(Request.Form("EndDays")); <BR><BR>alert(eDate); <BR>} <BR><BR>I am not getting anything. What I am doing wrong? <BR><BR>Thanks <BR>Sid <BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Java Script help

    Request.Form isn&#039;t a javascript object, so you can&#039;t use it. You have to use document.form.EndYear, etc to access the form variables. You have to do that from the page they are on, not the page the values are posted to, though

  3. #3
    Sid Guest

    Default RE: Java Script help

    Thank you so much for your response. I am new to java script. Can you please give me a line of code to assign date to a variable and the date to be &#039;07/16/01&#039; in format. Where as the date value from the control will be like 2001 (year). How can I convert this to (01)?. Please help.<BR><BR>Thanks<BR>Sid

Posting Permissions

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