Passing Php Values In An Ajax Call
so I'm making this deal website. On the index page of the deal website, there would be multiple deals listed and each deal has it's own end date. Now, I'm using this jQuery script
Solution 1:
You can use jquery ajax, so get correct date from php file via jquery ajax and set it into $('#defaultCountdown').countdown({until: austDay});
. If you want get date peridly from php file so u can use javascript setTimeOut.
Solution 2:
If you are planing to use php as a server side language, I would suggest to add another two fields to the table "initial date" and "for how long the deal will be available" and then subtract the time. every time that the user enters to your web site you echo the result of the subtraction. You can manipulate this with jquery to display it as a countdown.
Post a Comment for "Passing Php Values In An Ajax Call"