Archive for February, 2008

Hosting your JavaScript based app on code.google.com

While trying to use the hosting service at code.google.com, a Google employee taught me that I need to set the mime-type property on the files, so I can run the JavaScript based code.

svn propset svn:mime-type "text/html" myfile.html
svn propset svn:mime-type "text/javascript" myscript.js
svn commit

Leave a Comment

Applying time stamp to YUI AJAX calls for IE

In my previous post on this topic, I described the basic idea on using time stamp to work around the caching issue with IE. Here are additional notes on how to time stamp enable various YUI components using the same concept.

For autocomplete widget, you can override doBeforeSendQuery function and manually add timestamp parameter. See API document for more information.

For datatable widget, you can manually add time stamp parameter to initialRequest parameter. See documentation for more information.

If you are working with a connection object, you can configure cache:false in the callback function. This will automatically add the time stamp workaround for you. See documentation for more information.

Leave a Comment

HTML character codes

Here is a page with tables of HTML/ASCII character codes, which are useful to write encode actions.

Leave a Comment

Global search and replace in JavaScript

I was delighted to see that vi style of search and replace syntax also applicable with JavaScript’s replace() function. Here is an example.

Leave a Comment

CSS tweaks for different browsers

Dave Worley’s comment on this blog helped me to understand how to add IE specific CSS formatting definition to for IE and maintain compatibility for Firefox.

Leave a Comment