If you use URIencode() method you will find that some special characters (, / ? : @ & = + $ #) including colon is not encoded to ‘%3A’. To overcome this issue, you should use encodeURIComponent() encodeURIComponent(‘:’);
JSON date string to Date Object using RegEx
JSON has become de-facto standard for web services. When you use JSON in web services the date is returned as some numbers. How to convert it to readable date format? Checkout the following code on how we utilise Regular Expression to tackle this.. var prettyDate = prettyDate(“/Date(1277334000000+0100)/”); alert(prettyDate); var prettyTime = prettyTime(“/Date(1277334000000+0100)/”); alert(prettyTime ); function […]
Submit PHP form without refreshing the page with jQuery and Ajax
There are so many tutorials on this topic but not a single one to get started for absolute beginners. Here comes the easy to understand tutorial 🙂 html form <html> <head> <title>Hello world</title> <script type="text/javascript" src="jquery-1.7.2.js"></script> <script type="text/javascript"> […]
Get Reference to Canvas using jQuery
You can use JavaScript to get reference to a canvas in HTML5 but if you are someone so much into jQuery then you can use the following method to get reference to canvas using jQuery. Old School Way var canvas = document.getElementById(“canvas”); var context = canvas.getContext(“2d”); jQuery Way var canvas = $(“#myCanvas”); var context = […]
Dynamically List JQuery Mobile (Style Issue)
Recently I’ve been working on Mobile Jquery and stuff. I was doing a dynamic listview with mobile jquery and when is loaded it is very plain and no styles were applied. After searching online for a while I figure out we need to refresh the list to apply the style. Check out the code below. […]