Press "Enter" to skip to content

Posts published in April 2010

Search and Replace Anchor Href using Javascript

I have a site that is under development and it was made really badly so I needed a quick way to replace all anchors on page to the relevant path. The problem is because it was a testsite that lived away from the public facing domain, the anchors had to…

Error 29506 while installing SQL Server Management Studio Express

I was trying to install Microsoft SQL Server Management Studio Express (what a long name) on a machine and kept getting error 29506 right near the end with a Rollback action thereafter. To get this program installed you will need to run Command Prompt as Administrator and then run the…

PNG Transparency in IE 6 Using Javascript

Earlier versions of Microsoft Internet Explorer(IE6 and below) didn’t know how to handle the transparency in PNG image files. Luckily this can (somewhat) be corrected using some Javascript. Include the following function in either your site’s javascript file or in the head of your HTML document. [code lang=”javascript”] function bgPng(){…

Swap HTML Elements Using Javascript

It is quite easy to use javascript to swap between divs or any other html dom elements. Using the function below you can pass the id of the element to show and to hide. [code lang=”javascript”] function swapDivs(show, hide){ document.getElementById(show).style.display = “block”; document.getElementById(hide).style.display = “none”; } [/code]

A PHP Mail Class

Below is a Mail class I created in PHP, it requires 4 arguments on initiation of the class via the constructor and uses the method ->send() to send the created mail once complete. [code lang=”php”] class Mail { var $to; var $subject; var $content; var $headers; function Mail($to, $subject, $content,…

iTunes keeps maximizing!

Oh my goodness, this can be an annoying issue with iTunes. The problem is: iTunes will restore itself or maximize itself all the time every 20 or so seconds without being clicked on, it will also get main focus and whatever you were doing will have to wait! I solved…

Replace newline break in Excel

Ever needed to find & replace the newline character in a large excel document? In the Replace Dialog (Ctrl+F) Find: Hold down [alt] and type 010 on the numeric keypad. Replace: Replace with a space ” ” (without quotes)

PHPExcel Class Usage

I just finished adding an export xls (excel) export feature to a web application. I used the PHPExcel Class from CodePlex, its really great to work with – as far as the world of exporters go that is. In the example below the “exportCheckpoints” function requires an imploded string seperated…

unexpected T_IF

Getting “Parse error: syntax error, unexpected T_IF” ? Check if the preceeding line ends with a ;

Worst Websites of All Time – beware, alert boxes coming! Think you’ve found the worst website of all time? Post it below!