Archive

Archive for August, 2005

prototype.js AJAX library mod

August 26th, 2005 Mark No comments

[imported from Bloglines]

Whilst using the prototype.js AJAX library I have needed a timeout ability on the Request method.. i.e. so if the XMLHTTPRequest hasn’t returned data within X seconds, run a function and kill the request…

I have hacked a quick timeout function onto Prototype.js v1.3.1, you can download it here: prototype_1.3.1+moo_0.1.zip

Usage:
Just as you would use an onLoaded method or whatever, add an onTimeout method… if you don’t know how to do that, I would read the following documentation: Using Prototype 1.3.1

Categories: Internet, WebDev Tags:

User Agent Switcher

August 26th, 2005 Mark No comments

[imported from Bloglines]

Is very useful for those forums which let you browse the forum if you’re a bot, e.g. googlebot.. but try to force you to register otherwise..

Just switch your user agent to something like “Googlebot/2.1 (+http://www.google.com/bot.html)” and you’re in.

Just be weary of abusing this because administrators are likely to limit the Googlebot access further by IP or something.

Categories: Internet Tags:

prototype.js issues

August 25th, 2005 Mark No comments

[imported from Bloglines]

  • Ajax.Updater doesn’t work when page is served as application/xhtml+xml
  • evalScripts only works with Ajax.Updater
Categories: WebDev Tags:

Debugging AJAX + another Bloglines gripe

August 25th, 2005 Mark No comments

[imported from Bloglines]

I’m playing with AJAX at the moment and found some useful techniques/tools…

Currently I’m serving different formats depending on what browser is being used.

e.g

for browsers which support application/xhtml+xml / XHTML 1.x, they get:

mime = application/xhtml+xml

doc start =

<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

for other browsers, they get:
mime = text/html
doc start =

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Anyway, I have a javascript which creates a global variable called mimexml so that other parts of the script know how I’ve served the original page (there may be a better way to do this)

I’m using the prototype.js AJAX library and the following routine to update a div:

function showResponse(originalRequest)
{
if (mimexml) {
c =     document.getElementById('ici_ajaxresult');
removeChildNodes(c);
c.appendChild(document.importNode(
originalRequest.responseXML.documentElement.getElementsByTagName('div')[0],
true));
} else {
c =     document.getElementById('ici_ajaxresult');
c.innerHTML =     originalRequest.responseText;
}
}

What I wanted to do was “view source” but of the rendered page, after the javascript had done its stuff… (both in IE and FF)

Two useful tools:

Jennifer Madden’s View Rendered Source (Firefox Extension)

Bill Friedrich’s View Rendered Source (IE Utility)

Bloglines gripe: the editor is really very flakey (adding/editing a blog entry.. formatting stuff, pasting, view source, etc)

Categories: Internet, WebDev Tags:

New Google feature?

August 24th, 2005 Mark No comments

[imported from Bloglines]

I’ve only just noticed this, but google seems to be putting content links underneath the first search result:

Google content links

Categories: Internet Tags:

Messenger 7.5 & Google Talk

August 24th, 2005 Mark No comments

[imported from Bloglines]

It’s out for download now…

I’ve also installed google talk although I’ve got nobody on my list at the moment!

Messenger ID: mark@influenced.net
Google Talk ID: mark.hutton@gmail.com

Edit: I seem to be logged into my google talk account twice… I seem to remember doing this at work on the Jabber network that I created so maybe it’s a Jabber thing… I wonder which logged in client receives the incoming messages etc though? Surely the old client should be automatically logged out.

Categories: Internet Tags:

del.icio.us

August 24th, 2005 Mark No comments

[imported from Bloglines]

Here’s my del.icio.us bookmarks…

I’ve only just registered so the list won’t be very long for a while :)

Edit: it seems rather slow! Maybe they should throw a few more servers at the system

Categories: Internet Tags:

Web design books

August 24th, 2005 Mark No comments

[imported from Bloglines]

I have just ordered a few books from Amazon:

(in no particular order)

  • “The ZEN of CSS Design: Visual Enlightenment for the Web”Dave Shea; Paperback
  • “Bulletproof Web Design: Creating Flexibility with XHTML and CSS”Dan Cederholm; Paperback
  • The Art of Project Management”Scott Berkun; Paperback
  • “Professional CSS”Christopher Schmitt; Paperback
  • “Web Standards Solutions: The Markup and Style Handbook”Dan Cederholm; Paperback
Categories: WebDev, Website Tags:

BIOS Update Part 2

August 23rd, 2005 Mark No comments

[imported from Bloglines]

I remembered that there was a hidden setting in the BIOS which automatically OC’d graphics cards, set to ‘auto by default’

After I disabled this my card was back to normal!

Stupid MSI.

Categories: Hardware Tags:

BIOS Update

August 23rd, 2005 Mark No comments

[imported from Bloglines]

The last thing I did yesterday on my “gaming machine” was install the ATI Catalyst 5.8…

I come to play GTA:SA today and it doesn’t work.. wtf – spinning CD icon then nothing.

Numerous reboots later and still no luck.

  • Disabled reforce
  • Updated BIOS to latest version (1.30->1.A0), Neo2 Platinum MB
  • Restore BIOS settings to overclocked state

No joy

Search on google… find some forum thread about GTA: SA not working after 5.8 driver update! Uninstall 5.8′s, install 5.7′s

GTA:SA crashes after 2mins now

Setting ATI Tool back to use default values seems to work alright – so now I can’t overclock my graphics card

The BIOS update seems to have fixed the stalling on “Detecting IDE drives” which I sometimes get.. strange

So I don’t know if I should restore my 1.3 version of the BIOS with the original settings or what!

Categories: Hardware, Windows Tags: