Archive for July, 2007
Learning AJAX: Lesson 3 - XMLHttpRequest
Posted on Thursday, July 12th, 2007
After setting out the groundwork for my AJAX example by creating a random quote generator in PHP then using the DOM to add a link that will perform the AJAX function, I am now ready to start communicating with the server and loading up data without refreshing the page. To do so I need to get to grips with the XMLHttpRequest object.
A Bit Of Background
XMLHttpRequest is not yet a W3C standard, but there is a working draft. It was first implemented by Microsoft in Outlook before making its way to Internet Explorer 5 as an ActiveX Object. Then the Mozilla project got their hands on it, implementing it as a native browser object in Mozilla. The other browsers fell in line soon after. It is now the basis of AJAX and powers most of the web applications available online today.
Continue reading “Learning AJAX: Lesson 3 - XMLHttpRequest” »
Microsoft and Yahoo Working Together On Spam?
Posted on Wednesday, July 11th, 2007
Spam is top of a lot of people’s agenda at the moment. What with the new spam comments service that Darren Rowse has voiced complaint about (for the record, I don’t agree with it either) and seemingly a lot of spam getting through Akismet at the moment. I myself am finding a lot of spam getting into my email inbox at the moment, even though GMail is normally quite good at filtering it all out.
I don’t want to complain about spam right now though, as I received one of the less well thought out messages recently that gave me a good giggle. Very early this morning I received the following email:
MICROSOFT AWARD PROMOTION DEPARTMENT
#1 Microsoft Way Redmond, WA 98052
Ref: BTD/610/07
Batch: 742701AELucky Winner
You are Number(5) Amount won (1,000.000)One MillionGreat Britain Pounds)
Contact our Fiduciary agent
Mr.James Bennett Claims Agent)
E-mail:claimsagentuk9@yahoo.co.uk
My claims agent from the Microsoft Award Promotion Department has a Yahoo email address? I can’t wait for the day I receive a well thought out spam email, until then I will continue to laugh whilst I dump these in the spam folder.
Had any ridiculous spam recently? I’d love to see what you get too.
Edit: More spam! I have just seen that Akismet has just passed the 2 billion mark, will nothing stop these crazy spammers?
Learning AJAX: Lesson 2 - Adding A Link Using The DOM
Posted on Monday, July 9th, 2007
Having made my feelings about not using AJAX before creating a site that can be used fully without it, I have moved on to the next part of my example. Previously, I had a random quote generator that displayed a different quote when you refreshed the page. My aim is to use AJAX techniques to enable you to display a new quote without refreshing the page, but by clicking a link instead. To do so we will need to do some DOM scripting.
The Markup Doesn’t Change
Currently, the example does not have a link to click to replace the quote with a new one. We could add one into the markup so that it could trigger our javascript function that we are still to write, but if a user without javascript enabled visited our page then there would be a useless, broken link. From here on in, the markup for the page will stay the same and everything is to be added dynamically by javascript.
Continue reading “Learning AJAX: Lesson 2 - Adding A Link Using The DOM” »
Learning AJAX: Lesson 1 - Don’t Use AJAX
Posted on Friday, July 6th, 2007
Time to learn some hardcore javascript. Having played with the DOM I have decided that a good use of my time right now to get a start on some AJAX, the buzzword and technology of Web 2.0.
AJAX stands for Asynchronous Javascript and XML, which is a touch misleading as you needn’t use XML. The first part of the name does make sense, however, as the idea is to use javascript to fetch data from the server without reloading a page. It is useful as loading content only is much quicker than a whole page and it makes a web site seem more like standard desktop applications, for more details see the Adaptive Path introduction to AJAX. Continue reading “Learning AJAX: Lesson 1 - Don’t Use AJAX” »
Multiple WordPress Loops: Back To Normality
Posted on Wednesday, July 4th, 2007
Having hacked up the front page of my WordPress theme with three loops recently, I actually broke a couple of parts of the page. The previous posts link that you can see at the bottom of the front page now, stopped working because of the three different loops I was using.
At the time I replaced them with a link to the Archives, but I later received a message from Hans to tell me that the link was both not expected to visit the archives and wasn’t as useful as a link to the previous 5 posts. At the time I said I would do something about it, displaying bad usability on this site is against what I am trying to achieve, but didn’t get the chance, until now.
Continue reading “Multiple WordPress Loops: Back To Normality” »