Thursday, October 09, 2008

Maybank2U silly stylesheet mistake

Dear Designers,

Spot the difference!

#OOOOOO vs #000000

http://info.maybank2u.com.sg/index.htm



regards,
choongseng

Google Chrome XMLHttpRequest Behaviour

This little thing had bug me for sometimes and I managed to hunt it down for the past 1 hour.

Apparently, my brilliant AJAX application works perfectly on IE and Firefox, and by surprise, it worked on Opera and Safari as well. But... not on Google's Chrome!

With disappointment and partly also due to the lack of ability for me to debug the javascript codes on Chrome, I've leave it for sometimes.

And finally, it got fixed today!

In a nut shell, this is the finding:
var req = new XMLHttpRequest();
.... setting of url etc ...
var tagValue = "";
req.setRequestHeader("sometag", tagValue);


Basically, when you did this and execute the send function, you'll end up getting a status code of 0. And then, you'll start scratching your head because you won't find the http request in your web server as well.

Workaround?... simply set something to it, for me, I've put it as javascript null, and it simply translate it to string "null".

Hope this will help developers that read this post.

regards,
choongseng