Archive for May, 2010

Especially if you’re trying to match attributes and their values!
Thankfully Kooilnc, the godsend has a solution:
http://stackoverflow.com/questions/1231770/innerhtml-removes-attribute-quotes-in-internet-explorer
I’ve wrapped that up into a jQuery function here:
123456789101112131415161718192021222324$.fn.ieInnerHTML = function() {
  var zz = this.html(),
       z =
     zz.match(/<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|’.*?’|[^'">\s]+))?)+\s*|\s*)\/?>/g);
    if (z){
      for (var i=0;i<z.length;i++){
        var y, zSaved = z[i];
  [...]

God I hate IE…. and I really don’t often hate anything….
IE tends to cache its responses to some AJAX requests, which if you ask me is very stupid for its default behaviour.
FireFox caching is disabled by default. As always much love to the Fox.
Anyway, if you’re using jQuery.ajax() remember to pass the cache: false argument [...]

For my own records but may also be of interest to some…
This statement performs 4 conditional left outer joins and then uses CASE to conditionally select the returned columns as a single group of columns.
So a polymorphic one to one relationship is returned in a single query.
123456789101112131415$sql = <<<SQL
SELECT *, ELT(Log.action,’$elt_list’) AS what,
 CASE WHEN [...]


top