Javascirpt help

Results 1 to 2 of 2

Thread: Javascirpt help

  1. #1
    Sid Guest

    Default Javascirpt 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(eDat e); <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 Sigh...mixing client and server!

    You can&#039;t DO that!<BR><BR>Request.Form *only* works in ASP code. Running on the server.<BR><BR>The "alert" function *only* works in client code. Running in the browser.<BR><BR>There is no way to automatically and magically pass the data back and forth like you are attempting to do. Truthfully, I don&#039;t see how you didn&#039;t get a *TON* of compilation errors from that code. Or maybe you did, but you weren&#039;t aware of it?<BR><BR>Anyway, go back to square one. Get out the ASP book and re-learn where the boundaries between server and client are and what happens where and what you can do where.<BR><BR>

Posting Permissions

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