HTML and CSS

Quick Gotcha with HTML Forms, Image Inputs, and Internet Explorer

Posted in HTML and CSS on July 2nd, 2009 by Jamie – Be the first to comment

Watch out when using ‘image’ input types, since the $_REQUEST variables you get vary depending on the user’s browser. Let’s say you’ve got this input field:

<input type="image" src="go.png" value="go" name="pagination_submit" />

In Firefox (and I assume most other logical browsers) you’ll get three $_REQUEST variables from this input: ‘pagination_submit’, ‘pagination_submit_x’, and ‘pagination_submit_y’, where the latter two correspond to the X and Y positions of the part of the image the user clicked.

In Internet Explorer, however – versions 6 through 8 – you’ll ONLY get ‘pagination_submit_x’ and ‘pagination_submit_y’, not the straight ‘pagination_submit’. That’s a real bitch if you ask me… so be careful when testing for the existence of $_REQUEST variables for image input types.

Web Resource Roundup

Posted in HTML and CSS on April 2nd, 2009 by Jamie – Be the first to comment

How do people with jobs find the time to blog? Yeesh. I’ve got about 5 posts half-done but scraping together a few spare minutes every night – especially when you live with a two year-old is tough. So with that in mind here are a few interesting web development/design reads I’ve found in the past few days…