Tag: javascript
JavaScript Revision
JavaScript Robot Simulator (Updated)
*Updated in July 2015* This is a JavaScript robot simulator using HTML5 Canvas that moves around a square table top. The robot is free to roam the table, but must be prevented from falling to destruction. Any movement that would result in the robot falling from the table must be prevented.
JavaScript JSON.stringify and PHP json_encode json_decode
I used Ajax call quite a lot recently and thought that knowing how to process JavaScript array and PHP arrays as JSON string is really handy. So I’d like to note it down for future reference.
JavaScript prevent caching and preventDefault() not working issue in IE
Weeks ago, I incorporated Bootstrap popover function into one of my Facebook apps. It worked fine in Chrome (blame myself I didn’t do cross-browser testing in IE properly). This morning when it was supposed to go live we found that it didn’t work in IE! While debugging, I noticed the js file was not the right version that was supposed to be using. The solution is simple and you must have already known this but it’s worth noting it down: appending a timestamp to the JavaScript file should solve the problem (refer to David Walsh’s solution).