Forum Moderators: coopster
I need some help here i've been stuck with this for 2 hours now. It HAS to be so simple but mabey i'm overlooking something.
I have this code, and I made comments in the code to help I hope :)
$(document).ready(function() {
<?
// Do Time Stuff
// This turns my ending time into a useable format. I thought....
$date_f = date("m/d/Y h:i:s", $product->timeending);
?>
// Here we use the $date_f to set the ending time in a javascript countdown timer. The commented var d works great, the uncommented does not work.
var d = new Date("<? echo "$date_f"; ?>")
//var d = new Date("12/12/2009 12:00:00")
$('#defaultCountdown').countdown({until: d, expiryUrl: 'http://gotourl.com', format: 'MS'});
});
Any help would be SO appreciated!
When you view the generate source code, what does that line produce?
var d = new Date("11/09/2009 03:57:24")
//var d = new Date("12/12/2009 12:00:00")
$('#defaultCountdown').countdown({until: d, expiryUrl: 'http://example.com', format: 'MS'});
});
That's it :)
[edited by: eelixduppy at 10:46 pm (utc) on Nov. 9, 2009]
[edit reason] exemplified [/edit]