Tuesday 5 August 2008

HTTP Server Variable Gotcha

If you need to get the URL of the referring page that has submitted a form you need to look at the server variable "HTTP-REFERER" not "HTTP-REFERRER". It appears that a spelling mistake early on in the web has stuck.

I have been programming a web page using ASP which submitted a form, processed the details and redirected to a confirmation page. However, the form could be submitted from two different sites (an intranet site and a corresponding interent site) but both sites had to submit to the same site (it was updating an MS Access database). So I was looking at the referring page to determine which site to redirect back to. Doing some research had suggested getting the value of Request.ServerVariables("HTTP-REFERRER"), however after some time trying to figure out why it wasn't working I found out that it should be Request.ServerVariables("HTTP-REFERER").

Sunday 1 June 2008

Resetting PatientLine Terminals

When visiting my wife in hospital, we had been use of the internet facility available via the PatientLine service. However, after a while the browser (actually Internet Explorer 6) was becoming very slow, and so we exitted it. Even going back to the TV resulted in a message about low memory to keep appearing, and the phone didn't appear to be working very well.

So I thought, if it is using Internet Explorer then it is probably running a version of MSWindows (Embedded XP), and sure enough pressing ctl+alt+del on the attached miniature keyboard brought up the usual reset dialog. From there it is possible to select Reset and therefore reboot the terminal. I wouldn't recommend using the shutdown option as the is no obvious way to restart the system, and you would have to get someone to come out and restart it for you.

Anyway after a few minutes watching the system shutdown, restart, boot from the network, start up xp, and waiting for all the applications to start up, the terminal was again working at full speed.

Monday 19 May 2008

Updating Posted Date/Time on del.icio.us

If you need to update the when an item was posted to del.icio.us, for example if you want it to reflect the last time the post was updated etc. Then there are 2 ways this can be performed.

The first, official way is to use the official API (see http://del.icio.us/help/api/posts )and use https://api.del.icio.us/v1/posts/add? and use the &dt argument to set the date and time.

The second way is to use the FireFox browser when the "Web Developer" add-in and doing:
1. click on "edit" in the list of your bookmarks and select "full-screen edit";
2. on the web developer's toolbar select "Forms | Display Form Details", which displays the hidden fields.
3. find the hidden text in a box "<input name="date">", the field to the right of this is the posted date
4. retype this date, ensuring it is in the same format (yyyy-mm-ddThh-mm-ssZ)
5. sumbit the form in the usual way by clicking on "save"

p.s.

Now that del.icio.us has upgraded its site and become delicious.com this second method no longer works, and the only way is to use the API.

Thursday 15 May 2008

My first post

Finally got around to setting up my web log, and here it is!