skip to content
AdaWiki
User Tools
Log In
Site Tools
Search
Tools
Show page
Old revisions
Backlinks
Recent Changes
Media Manager
Sitemap
Log In
>
Recent Changes
Media Manager
Sitemap
You are here:
start
»
tutorials
»
zencartmods
»
daily_ajax.html
Trace:
tutorials:zencartmods:daily_ajax.html
==== AJAXify your Daily stats ==== Last week, we created a [[daily_stats.html| daily stats]] page. If you're like us, then you compulsively click refresh on this page way too often! So lets AJAX-ify this page so that it updates automatically every time someone makes an order. === Get jQuery === We're going to use jQuery for this page. [[http://jquery.com/|jQuery\]] isn't necessary for AJAX, you could just use plain javascript as well, but jQuery makes things much easier in general. You can either [[http://docs.jquery.com/Downloading_jQuery#Download_jQuery|download jQuery]] and host it on your own server, or use a CDN like Google or Microsoft. We use Google's CDN. If you're hosting it on your own server, then add to the **<head>** section of daily stats <code> <script src="https://you.path/to.jquery.js"></script> </code> or if you're using a CDN (this one is Google) then use <code> <script type="text/javascript" src="https://www.google.com/jsapi?key=YOUR_API_KEY"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> </code> you have to replace YOUR_API_KEY with the API key you've obtained from Google.
/home/ladyada/public_html/wiki/data/attic/tutorials/zencartmods/daily_ajax.html.1308756117.txt.gz
· Last modified: 2016/01/28 18:05 (external edit)
Page Tools
Show page
Old revisions
Backlinks
Back to top