Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2003
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Passing value from ASP to Javascript

    I have a count down clock which counts down until certain event. It requires current date time and ending date time. I need to pass the ending date from the ASP to javascript. How do I do it?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Northern NJ
    Posts
    404
    Thanks
    0
    Thanked 1 Time in 1 Post
    function time()
    {
    var count
    count = "<%=Now() %>"
    ...
    }

    this should work.
    Last edited by ecnarongi; 10-29-2003 at 10:14 PM.
    I would rather be a lion for a day than a lamb that lives forever.

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    you need to pass Now() or some vbscript date to js Date object.

    var endDate = new Date("<%=Now()%>");
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #4
    New Coder
    Join Date
    Oct 2003
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you both


  •  

    Posting Permissions

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