Posts filed under 'Markup'
Google is clearly the better search engine overall - I've never had a problem with it. That was until I decided to syndicate some of its news feeds. Google has taken it upon themselves to provide their newsfeeds in html format. And its not even good HTML. Each item is packed with tables, and font tags where it would be simpler to just provide these news snippets as plain text. There is more than enough allowance in the RSS 2.0 specifications to allow for images to be placed outside the description, yet they fall down on this part. You'll find images placed besides news articles that are sometimes hardly relevant.
April 27th, 2006
One of the talks whilst I was at the UK PHP Conference was on AJAX, and its downfalls. The talk was done by Harry Fuecks, someone whose opinion is respected within the online community. I've always been a bit wary of 'new' technologies when they surface, and the mad rush to implement them as they are 'cool'. Ajax is not exceptionally new. Internet Explorer was the first browser to implement the XMLHttpRequest protocol as an ActiveX object, way back in IE 5 circa 1999. However, its only been the recent use by certain big sites such a Google and Amazon that have made it more mainstream in the rush to implement it.
Continue Reading February 11th, 2006
At the heart of every dynamic website is a way for the user to interact with the data it provides, and one very common way of interacting with with such data is by the use of HTML Forms. Generally (and hopefully obviously), a form is "submitted" when the user activates an HTML input element with the type attribute set to submit. However, most user agents will also submit a form when you give focus to an input element with attribute set to text and hit return. With PHP, the most common way to test if a form has been submitted is to simply test if the $_POST/$_GET array is empty or not, however when using the aforementioned multiple submit button techniques, a problem arises:
- sensible user agents (Gecko based browser, for example) will simply act as though the first submit button had been pressed, and proceed normally.
- MSIE (Internet Exploder?) will submit the form without passing any submit elements in the resulting array, which can cause all kinds of problems if you want to test their validity
The Solution? It is perfectly valid to have multiple input elements with the same name attribute, so simply place a hidden field with the same name/value as your preferred default action. For example:
November 28th, 2005
The ubiquitous bloke in the pub is the bloke who can get you anything. He's also a web designer. Or he knows a web designer. Rather, he knows someone whose brother is a web designer and can 'knock you up a website, no problems'.
Its always amazed me that no one would trust someone to 'knock you up a car' or 'get you a cracking deal on a new tv'. No, you'd tend to go to the experts to get a car or a new tv - especially as they know what they are talking about.
November 21st, 2005