Articles

Fixing Javascript Errors in WordPress SEO

In the last two versions of Yoast’s WordPress SEO plugin there’s been errors in the JavaScript that cause parts of tinymce to not work. The issue is some of the variables are not strings like expected, so when they try to run string methods against them, causing JavaScript to throw a syntax error. The simple [...]

New Formatting for XMLHttpRequest

Recently I decided to try reducing the size of hacking the HTTP request for cross browser support in AJAX. This little snippet has been tested and is working.

// new xml http object
var xmlHttp = new XMLHttpRequest() ? new XMLHttpRequest() :
( new ActiveXObject(“Msxml2.XMLHTTP”) ? new ActiveXObject(“Msxml2.XMLHTTP”) :
( new ActiveXObject(“Microsoft.XMLHTTP”) ? new ActiveXObject(“Microsoft.XMLHTTP”) : null ) );