Archive for March, 2012

Keep checkboxes checked with MySQL and PHP

Most of the time we have a website or a back-end solution, written in PHP, where we use check-boxes as “flags” (to activate a user or a product for example – 1=active, 0=inactive).

Below is the example that I will base on our fictional “products” page in the back-end solution, where we specify if a given product is active or inactive (in order to show or hide it on the front of the site).

Continue Reading No Comments

jQuery/Ajax XMLHttpRequest() problem in Internet Explorer – “Object doesn’t support this property or method”

This is a common problem with Microsoft Internet Explorer browser (with ActiveX, actually) and it has been present forever. While calling and Ajax function

IE will say that Object doesn’t support this property or method. In Firefox and Google Chrome above code works with no issues, so all we have to do is implement an if statement, checking for our browser. If the browser is detected as Internet Explorer, we will load ActiveX instead of XMLHttpRequest.

Continue Reading No Comments