Javascript parsing issue on IE7


I had a problem in a page that gets it's content via an ajax request and place the result of the ajax request in a slider, I was testing it on other browsers, and It came to IE, passed IE9 and IE8, and when it came to IE7 I couldn't see the slider with it's … Continue reading Javascript parsing issue on IE7

Javascript: dealing with cookies


function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = … Continue reading Javascript: dealing with cookies

Change page URL without refreshing page


Can we change page URL, eg. when sending an ajax request, or opening an image in a light-box? HTML5: Changing the browser-URL without refreshing page Reference: http://spoiledmilk.dk/blog/html5-changing-the-browser-url-without-refreshing-page An often overlooked feature of HTML5 is the new “onpopstate” event. This new feature offers you a way to change the URL displayed in the browser* through javascript without … Continue reading Change page URL without refreshing page