Griffin Interactive

Internet Explorer and 24-bit Alpha transparent PNGs

July 21, 2006
Web design

Everybody knows that Internet Explorer cannot render 24-bit alpha transparent PNG's. Which is a shame because drop shadows and rounded corners are so en vogue at the moment (2006).

There is a way to use a Microsoft filter within your stylesheet so that PNG's are rendered correctly, the trouble is this is quite resource intensive (uses up your computers memory) and if you use Anchor tags or even form elements like text input boxes then they won't work.

There are however a couple of sneaky hacks that can help.

The following shows how Internet Explorer has problems with form elements and filters when used together.

Example 1 - The problem

Form elements are unusable

Login

Example 2 - The work around

Use a 24-bit alphtransparent image as it is but force the input elements to be relatively positioned with a z-index of 0.

	
    #filter-example-2 label, #filter-example-2 button {
	  position:relative; 
	  z-index:0;
	 }
	

	
Login

Example 3 - Another work around

Use a 24-bit alphtransparent image 1px x 1px.

We can't repeat the image (i.e. repeat-x / y) but we can scale it using the filter

Login

XMLHttpRequest Object methods

July 15, 2006
Web design
Description of the Methods and Properties used to make up the XMLHttpRequest Object
Method/PropertyDescription
abort()Stops the current request.
getAllResponseHeaders()Returns the response headers as a string.
getResponseHeader("headerLabel")Returns a single response header as a string.
open("method", "URL"[, asyncFlag[,
"userName"[, "password"]]])
Initializes the request parameters.
send(content)Performs the HTTP request.
setRequestHeader("label", "value")Sets a label/value pair to the request header.
onreadystatechangeUsed to set the callback function that handles request state changes.
readyStateReturns the status of the request:
0 = uninitialised
1 = loading
2 = loaded
3 = interactive
4 = complete
responseTextReturns the server response as a string.
responseXMLReturns the server response as an XML document.
StatusReturns the status code of the request.
statusTextReturns the status message of the request.