...

View Full Version : Passing value from ASP to Javascript



kumghi
10-29-2003, 10:30 PM
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?

ecnarongi
10-29-2003, 10:56 PM
function time()
{
var count
count = "<%=Now() %>"
...
}

this should work.

glenngv
10-30-2003, 02:08 AM
you need to pass Now() or some vbscript date to js Date object.

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

kumghi
10-30-2003, 03:28 PM
Thank you both :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum