PDA

View Full Version : Universal countdown, problem with <% Now() %>



beades
06-22-2007, 03:06 PM
Universal countdown

http://www.dynamicdrive.com/dynamicindex6/universalcountdown.htm

I'm running the universal countdown script from within the Mason templating system. This line in the script is causing me a problem:


var servertimestring= [snip] '<%= Now() %>'

The problem is that the syntax '<% something %>' is used by Mason to include components, call functions, etc. So Mason throws an error when it encounters '<%= Now() %>', since it tries to interpret it as a Mason command.

Is there some other code I can use to replicate the results of the '<%= Now() %>' statement? I can use either PHP or SSI.

Twey
06-22-2007, 03:14 PM
If you're not using ASP, you can just remove the whole thing -- replace it with an empty string.