Saturday 29 November 2008

Being rubbish at doing my website

This morning I checked my email and hotukdeals, then did some work on my website, just finishing up the query to store the information submitted from the edit form in the database.

After lunch I did more work on my website, making it so that if you didn't fill the form in correctly, then it will highlight what you did wrong and also refill the form with the information you typed in (just in php, still have all the javascript form validation to write). A problem I had with this is that the select box of countries normally chooses the country that should initially be selected when the edit form button is clicked by using javascript. But if someone doesn't fill the form in, then the form is automatically displayed and they don't have to click the edit button. This means the javascript isn't fired and so the country select box is left at 'Please select' rather than whatever country you'd chosen when you submitted the form. To fix this I just changed the javascript so it will select the country when the page loads, rather than when you click the edit button.

Then I thought that having javascript select the country wouldn't be useful if you don't have javascript enabled. So I ran some tests to see how quick a hardcoded version of the countries select, with javascript selecting the correct country compared to building the country select with php and php selecting the correct country. It was a lot quicker with javascript, so I'll keep it with javascript for the moment. I don't think many people are likely to be browsing my site using a screen reader, although I do like to keep usability and accessability in mind.

Before and straight after dinner I tried to get my surround sound speakers working properly as the sounds were coming out the wrong speakers. It took quite a while as I had problems with the computer crashing, then not starting up when I reset it, the sound not working at all, and the sound not working when I plugged/unplugged any of the plugs from the soundcard.

After getting that working properly I checked hotukdeals, and then watched Lost with Maccy and Ben. I went on the canon lens forum on dpreview for a bit, watched IACGMOOH with Mac, then finished reading the new threads I was interested in on the canon lens forum on dpreview.

The weather today was foggy all day, didn't see any hint of the sun at all.

Food
Breakfast: Blood orange marmalade toast sandwich; cup o' tea.
Lunch: Peppered ham sandwich; apple; pieces of gingerbread house; cup o' tea.
Dinner: Slice of Pepperoni pizza; chips; mixed veg. Pudding was: banana whip; butterscotch whip; sliced banana; pineapple chunks. Coffee; Sainsbury's chocolate caramel.

No comments: