<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-37672055</id><updated>2009-10-23T05:11:14.335-07:00</updated><title type='text'>Busted Mug</title><subtitle type='html'>A blog that documents solutions to the most frustrating problems that occur during development in technologies such as Java, XML, AJAX, SQL, CSS and others that make me want to throw my coffee mug against the cube wall.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default?start-index=26&amp;max-results=25'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>45</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-37672055.post-672566280467102401</id><published>2008-06-02T11:43:00.000-07:00</published><updated>2008-06-02T11:52:34.494-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySql'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='gears'/><title type='text'>Dumping a mysql database - piece of cake</title><content type='html'>&lt;p&gt;
I love MySql.  A lot.  No muss, no fuss.  It just gets the job done.  Granted I am not supporting it on an enterprise level (as the argument usually goes from the pro-proprietary), but it really fits my needs great.  
&lt;/p&gt;&lt;p&gt;
Case in point: I had a prototype project hosted on some hardware that was incurring cost.  Being that the prototype had outlived it's usefulness I wanted to back up my code but then un-host it and get rid of the hardware.  Since the project was quite simple, I had done the MySql DB work myself (I'm usually a java developer but I was DB admin as well on this LAMP project).  Now it came time to back up the database.
&lt;/p&gt;&lt;p&gt;
I googled for backing up a MySql database and found &lt;a href="http://www.devshed.com/c/a/MySQL/Backing-up-and-restoring-your-MySQL-Database/"&gt;this&lt;/a&gt;.  It simply outlines the utility included with MySql that accomplishes my purpose.  I ran a simple:
&lt;/p&gt;
&lt;div class="code"&gt;
mysqldump -u root -p Complaints &gt; complaints.sql
&lt;/div&gt;
&lt;p&gt;
Bam!  All done!  5 minutes tops.  Data and structure backed up and ready to be re-instantiated at my bidding.  Hence, I love MySql.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-672566280467102401?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/672566280467102401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=672566280467102401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/672566280467102401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/672566280467102401'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2008/06/dumping-mysql-database-piece-of-cake.html' title='Dumping a mysql database - piece of cake'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-8162933035243029534</id><published>2008-03-25T07:37:00.000-07:00</published><updated>2008-03-25T07:59:17.308-07:00</updated><title type='text'>Database operation failed. ERROR: library routine called out of sequence DETAILS: not an error</title><content type='html'>&lt;p&gt;I ran into this guy "Database operation failed. ERROR: library routine called out of sequence DETAILS: not an error" while working on a google gears application.  The error comes from SQL Lite (the technology under the sheets of gears' data store).  There didn't seem to be much documentation on the web to help but finally from placing lots of alert statements (don't you love javascript?) I narrowed it down to a call to rs.next().  I knew the data set would be empty so I immediately suspected I was doing something wrong with checking for the end of the RS.
&lt;p&gt;My suspicions were confirmed when I found the following code block at &lt;a href="http://code.google.com/apis/gears/api_database.html#ResultSet"&gt;http://code.google.com/apis/gears/api_database.html#ResultSet&lt;/a&gt;:
&lt;br&gt;
&lt;div class="code"&gt;
while (rs.isValidRow()) {
  console.log(rs.fieldName(0) + " == " + rs.field(0));
  rs.next();
}
rs.close();
&lt;/div&gt;
&lt;p&gt;It appears I missed something basic.  Unlike both Oracle and MySQL, when grabbing a new row in SQL Lite in Gears there isn't any automatic evaluation that the row is valid.  You have to explicitly call the isValidRow() method.  This leaves out the nice and tidy while(rs.next) loops that we all love so much.  The first row comes pre-loaded then you have to next after each use.  As the dude would say "That's a bummer, Man."  I hope I head off someone else freaking out over this novice problem when working in Gears.  Maybe SQL Lite/Gears will eliminate the need for the call some day, until then...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-8162933035243029534?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/8162933035243029534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=8162933035243029534' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/8162933035243029534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/8162933035243029534'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2008/03/database-operation-failed-error-library.html' title='Database operation failed. ERROR: library routine called out of sequence DETAILS: not an error'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-5339712494469629841</id><published>2008-03-01T05:35:00.000-08:00</published><updated>2008-03-01T05:48:16.929-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='js'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='offline'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='gears'/><title type='text'>Google answers online state dilemma with non-answer</title><content type='html'>&lt;p&gt;As I discussed in &lt;a href="http://bustedmug.blogspot.com/2008/03/google-gears-and-online-state-dilemma.html"&gt;my previous post&lt;/a&gt; There isn't a way to maintain online state with &lt;a href="http://gears.google.com/index2.html"&gt;Google Gears&lt;/a&gt;.  I just found &lt;a href="http://code.google.com/support/bin/answer.py?answer=82722&amp;topic=11692"&gt;an entry on Google Code&lt;/a&gt; which addresses the subject when it comes to database stores.  I totally understand Google's point about wanting developers to ensure synchs are reliable and not assume online = success.  That still doesn't address my issue with LocalServer rather than the Database module of Gears. &lt;/p&gt;

&lt;p&gt;A bit frustrating also is to see that on the same page Google provides essentially the same code I discussed previously to ping the server with AJAX to verify that it is available.  GaH!  Wasted effort!&lt;/p&gt;

&lt;p&gt;I have to say that I do think Google is cutting off it's nose to spite it's face here.  While an isOnline() function might be abused when it comes to the local database, it's entirely necessary (as I've demonstrated) for the localServer which is 1/3 of the gears trinity.  In addition, I've seen time and time again that you can't use technology to make programmers do their job correctly (I've tried).  You have to empower them to make good design decisions on their own, warn them of the pitfalls, and then let them deal with the consequences if they don't do their job well.  It's an annoying fact of life in IT (I would know, I've done a lot of cleanup after bad programmers).  That's my 2 cents anyhow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-5339712494469629841?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/5339712494469629841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=5339712494469629841' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/5339712494469629841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/5339712494469629841'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2008/03/google-answers-online-state-dilemma.html' title='Google answers online state dilemma with non-answer'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-7990654753521522644</id><published>2008-03-01T05:10:00.000-08:00</published><updated>2008-03-01T05:29:49.025-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='js'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='offline'/><category scheme='http://www.blogger.com/atom/ns#' term='ecma'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='gears'/><title type='text'>Google gears and the online state dilemma</title><content type='html'>&lt;p&gt;As I mentioned in my previous post I've been working with &lt;a href="http://gears.google.com/index2.html"&gt;Google Gears&lt;/a&gt; as of late.  Being a greenhorn to this technology (as nearly everyone is since it's pretty new) I found myself considering some fairly serious design questions.  The most interesting was "how do I tell if a user is in offline mode (pages and data cached) but has the ability to switch over to online mode?"&lt;/p&gt;

&lt;p&gt;Now of course whenever you talk about "modes" in an application it is natural to think about a state machine.  That gets a little dicier with the new paradigm introduced with Gears.  Since gears runs purely in javascript with a little interaction with the browser plugin, I decided that making an AJAX request for a file that doesn't get cached (as defined in my gears manifest file) was best.  If I got the proper contents of that file then I knew the person could swap to online mode, if not then I know they aren't connected.  Simple right?&lt;/p&gt;

&lt;p&gt;So I thought.  Once I whipped up my code I could offline and online my pc and the app was stateful, except of course for a little lag that the ajax request took to timeout when it wasn't ever going to get a response from the server.  I included validation based on state to see if I would let the user remove their cached pages and get the online one and everything was happy.&lt;/p&gt;

&lt;p&gt;Then I decided to take a look at what I'd done pretending to be a non-technical user.  I offlined my app and then watched it.  During the lag I noticed that the app state was still online (meaning you could validly switch to online mode) because the first AJAX request hadn't failed yet.  So I thought to myself "what if the user took this literally and assumed they were connected via wifi or something and tried to go online?"&lt;/p&gt;  

&lt;p&gt;The answer: DEATH.  Ok not really death but my state machine happily checked its state, saw that it was online, removed all the cached pages and tried to get at the online version of the page.  This of course resulted in a 404 as the user wasn't actually connected.  No good.  My first instinct was that I had to prevent this from ever being a possible scenario because a user would probably freak out.&lt;/p&gt;

&lt;p&gt;The half-measure I took to do this was to break out the cache-removing code and not include it on the manifest.  Now the user can attempt to remove their cache, but if they aren't actually online they won't find that page and get a 404, but they can back up and the app is still happily serving up cached content while they continue to be offline.&lt;/p&gt;

&lt;p&gt;I'm happy with this but not completely.  It seems to me (at least so far) that there's no way to conquer this part of the paradigm shift that gears introduces into web applications.  No matter how you code around it, the web layer always has a degree of latency associated with it that will allow a window for 404 messages.  I hate for the user to see that.  I'll update if I figure out a way around this loophole, please comment if you know one ;)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-7990654753521522644?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/7990654753521522644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=7990654753521522644' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/7990654753521522644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/7990654753521522644'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2008/03/google-gears-and-online-state-dilemma.html' title='Google gears and the online state dilemma'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-1743306921950567104</id><published>2008-03-01T04:49:00.000-08:00</published><updated>2008-03-01T05:08:51.738-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='forking'/><category scheme='http://www.blogger.com/atom/ns#' term='offline'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='gears'/><category scheme='http://www.blogger.com/atom/ns#' term='threading'/><title type='text'>Simple, cross-browser threading (forking) in php</title><content type='html'>&lt;p&gt;I recently had a need to do some threaded processing in php while working on a &lt;a href="http://gears.google.com/index2.html"&gt;Google Gears&lt;/a&gt; prototype application.  As is often the case with gears, when synching the data with the online database, it'll take a while.  If you're doing this explicitly and not in the background, it's nice to at least be able to update the user of the process' status using AJAX.  This was my need for threading (forking in php).  I wanted to run a thread to handle the update of the database and let the user sit on a page that keeps checking on the progress and updating a progress bar.  Intuitive, right?&lt;/p&gt;

&lt;p&gt;Since it had been a while since I've worked with forks in PHP I figured I'd check out Google for a tutorial on the best practice on the subject.  Whoa.  I got like 90 different methodologies and hardly any worked for all scenarios and cross-platform (I don't know if my project will end up on a server with windows under it or *nix).  That is, until I found &lt;a href="http://www.djkaty.com/drupal/php/fork"&gt;this blog entry by a chick named Katy&lt;/a&gt;.  She demos the following code:&lt;/p&gt;
&lt;br/&gt;&lt;br/&gt;
To create a fork:
&lt;div class='code'&gt;&lt;pre&gt;
function startFork($path, $file, $args)
{
  chdir($path);

  if (substr(PHP_OS, 0, 3) == 'WIN')
    $proc = popen('start /b php "' . $path . '\\' . $file . '" ' . $args, 'r');
  else
    $proc = popen('php ' . $path . '/' . $file . ' ' . $args . ' &amp;', 'r');
 
  return $proc;
}
&lt;/pre&gt;&lt;/div&gt;
&lt;br/&gt;
To get data from the fork:
&lt;div class='code'&gt;&lt;pre&gt;
while (!feof($proc)) {
  $data = fgets($proc);

  // Do something with the data
}&lt;/pre&gt;
&lt;/div&gt;


This methodology is great because it seems to always fit.  It's pretty easy to understand too.  It does involve some OS calls but has conditions for for windows and *nix, which is ok by me.  It's a simple method that starts a new process for the thread.  I plan to implement post haste.  I'd recommend this if you need to do some threading (forking, I wish Java and PHP would get on the same page as far as terminology is concerned).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-1743306921950567104?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/1743306921950567104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=1743306921950567104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/1743306921950567104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/1743306921950567104'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2008/03/simple-cross-browser-threading-forking.html' title='Simple, cross-browser threading (forking) in php'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-6540215151460634083</id><published>2007-11-15T07:32:00.000-08:00</published><updated>2007-11-15T07:50:28.144-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='js'/><category scheme='http://www.blogger.com/atom/ns#' term='ecma'/><category scheme='http://www.blogger.com/atom/ns#' term='w3c'/><category scheme='http://www.blogger.com/atom/ns#' term='dom'/><category scheme='http://www.blogger.com/atom/ns#' term='id'/><category scheme='http://www.blogger.com/atom/ns#' term='name'/><title type='text'>IE duplicates element IDs into the Name attribute, which screwed me up!</title><content type='html'>&lt;p&gt;ARGH!  This one really gets me steamed.  It seems that IE has decided that rather than supporting the applicable W3C and ECMA standards, they do what made sense to them.  Surprised?  I'm not.  Anyhow, what the world ends up being stuck with is a scenario where id attributes are mirrored into an invisible name attribute for form elements.  Why?  So some lazy javascript developer somewhere can erroneously use getElementById('x') to access an element that has the NAME "x" but no the ID "x".  I'll spare you the departure into the fact that the frigging function says ID in it and there's another one that uses NAME explicitly.  Such mastery of scripting is apparently too much to ask. &lt;/p&gt;
&lt;p&gt;That on it's own is lazy, but not terrible.  However it turns terrible when you've got some code like this:
&lt;div class="code"&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;td&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;id&lt;/font&gt;&lt;font color='blue'&gt;="range5"&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;input&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;type&lt;/font&gt;&lt;font color='blue'&gt;="text"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;name&lt;/font&gt;&lt;font color='blue'&gt;="range5"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;/&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;td&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;
&lt;/div&gt;
&lt;p&gt;Now when you submit some perfectly reasonable HTML like this to a web server with a decent browser like firefox you get only 1 element named range5 as you'd expect because you only named one element range5.  Try the same with IE and what you'll end up with is a few hours of debugging and cursing the MSoft name.  At the end of said debugging you'll find that since IE mirrors the ID attribute into the name attribute (invisibly) The server actually is submitted 2 elements named range5, the first of which in this case has a null value.  ARRRRRGH!&lt;/p&gt;
&lt;p&gt;So then what is the world left to do about such idiocracy (excellent movie by the by, look it up)?  Well, I for one am going to dutifully note this in my "things that suck about IE to think about when coding" list that I always have running around in my head, and not name any IDs the same as NAMEs even though those are supposed to be two distinct entities with no relationship what so ever. IE sucks.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-6540215151460634083?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/6540215151460634083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=6540215151460634083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/6540215151460634083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/6540215151460634083'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/11/ie-duplicates-element-ids-into-name.html' title='IE duplicates element IDs into the Name attribute, which screwed me up!'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-7981631774676018451</id><published>2007-11-07T08:43:00.000-08:00</published><updated>2007-11-15T07:51:35.134-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='multi-lingual'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='i18n'/><title type='text'>AJAX and multi-lingual apps (i18n)</title><content type='html'>I found a great list of &lt;a href="http://swik.net/Ajax/Ajax+Mistakes"&gt;AJAX mistakes (http://swik.net/Ajax/Ajax+Mistakes&lt;/a&gt;) in the course of making one.  When dealing with mutli-lingual apps you need to use the UTF-8 char set as it provides umlauts and tilde's for spanish and german (just to name a few).  The obvious implementation is to set this on your HTML response.  The easy part to miss though is to set them in ajax as Ajax Mistakes points out:
&lt;blockquote&gt;&lt;h3&gt;Character Sets&lt;/h3&gt;

One big problem with using AJAX is the lack of support for character sets. You should always set the content character set on the server-side as well as encoding any data sent by Javascript. Use ISO-8859-1 if you use plain english, or UTF-8 if you use special characters, like æ, ø and å (danish special characters) Note: it is usually a good idea to go with utf-8 nowadays as it supports many languages).&lt;/blockquote&gt;

As it turned out I needed to set the content type of my response to include the UTF-8 character set like so:
&lt;div class="code"&gt;
response.setContentType("text/html; charset=utf-8");
&lt;/div&gt;

Then my AJAX response came through with valid characters, yay!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-7981631774676018451?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/7981631774676018451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=7981631774676018451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/7981631774676018451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/7981631774676018451'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/11/ajax-and-multi-lingual-apps-i18n.html' title='AJAX and multi-lingual apps (i18n)'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-6823269478151242292</id><published>2007-03-19T06:54:00.000-07:00</published><updated>2007-03-19T06:54:40.942-07:00</updated><title type='text'>Busted Mug: Dynamic Assignment of Event Handlers - A generic rollover event</title><content type='html'>&lt;a href="http://bustedmug.blogspot.com/2007/03/dynamic-assignment-of-event-handlers.html"&gt;Busted Mug: Dynamic Assignment of Event Handlers - A generic rollover event&lt;/a&gt; - Gosh, what was I thinking?  You've gotta preload those rollovers!  Here's a revised version using a dynamically created function as the dynamically created event handler.  Say that ten times fast...you'll probably want to dynamically go create yourself a cup of coffee ;)

&lt;div class='code'&gt;
//bch:&amp;nbsp;better&amp;nbsp;code&amp;nbsp;for&amp;nbsp;rollovers&lt;br /&gt;
function&amp;nbsp;start(){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;els&amp;nbsp;=&amp;nbsp;document.getElementsByTagName('img');&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for&amp;nbsp;(i=0;&amp;nbsp;i&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;els.length;&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;i++){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(els[i].className&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;==&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;"rollover"){&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;tmp&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;new&amp;nbsp;Image();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//save&amp;nbsp;out&amp;nbsp;source&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmp.src&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;els[i].src;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;outs[i]&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;tmp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//save&amp;nbsp;over&amp;nbsp;source&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmp.src&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;els[i].substring(0,src.length-4)&amp;nbsp;+&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;"_over"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;+&amp;nbsp;src.substring(src.length-4);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;overs[i]&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;tmp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//set&amp;nbsp;event&amp;nbsp;handlers&amp;nbsp;w/&amp;nbsp;dynamic&amp;nbsp;functions&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;els[i].onmouseover&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;eval(new&amp;nbsp;function&amp;nbsp;(){&amp;nbsp;this.src&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;overs[i].src});&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;els[i].onmouseout&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;eval(new&amp;nbsp;function&amp;nbsp;(){&amp;nbsp;this.src&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;outs[i].src});&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
}&lt;/font&gt;
 &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-6823269478151242292?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/6823269478151242292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=6823269478151242292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/6823269478151242292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/6823269478151242292'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/03/busted-mug-dynamic-assignment-of-event.html' title='Busted Mug: Dynamic Assignment of Event Handlers - A generic rollover event'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-2935025040819145854</id><published>2007-03-16T10:55:00.000-07:00</published><updated>2007-03-16T10:59:46.475-07:00</updated><title type='text'>Double killer delete select all</title><content type='html'>&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/2Y_Jp6PxsSQ"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/2Y_Jp6PxsSQ" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;br /&gt;
Oh it burns so good! It reminds me of this classic windows 98 debachle
&lt;br /&gt;
&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/lccT1ZM5soA"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/lccT1ZM5soA" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-2935025040819145854?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/2935025040819145854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=2935025040819145854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/2935025040819145854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/2935025040819145854'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/03/double-killer-delete-select-all.html' title='Double killer delete select all'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-600238390324728483</id><published>2007-03-16T08:53:00.000-07:00</published><updated>2007-03-16T08:53:39.497-07:00</updated><title type='text'>Mystery white space before a table</title><content type='html'>&lt;p&gt;I was trying to debug some mystery white space that was appearing on a page before a table.  For some reason the source code showed nothing before the table, but the display didn't agree.&lt;/p&gt;

&lt;p&gt;Using FireBug (an add-on to firefox that i HIGHLY recommend) I was able to see that FFox thought that white  space should be there because of some BR tags.  Curious.  I couldn't find them anywhere.&lt;/p&gt;

&lt;p&gt;Finally tracing through I ran into a much more obfuscated version of this:&lt;/p&gt;

&lt;div class='code'&gt;
&lt;font color='blue'&gt;out&lt;/font&gt;&lt;font color='black'&gt;.println(&lt;/font&gt;&lt;font color='#808080'&gt;"&amp;lt;table&amp;gt;"&lt;/font&gt;&lt;font color='black'&gt;)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
for&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(&lt;/font&gt;&lt;font color='blue'&gt;int&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;i&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='maroon'&gt;0&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;i&amp;lt;contents.length&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;i++){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;out&lt;/font&gt;&lt;font color='black'&gt;.println(&lt;/font&gt;&lt;font color='#808080'&gt;"&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;"&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;+&amp;nbsp;contents[i]&amp;nbsp;+&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;"&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;br&amp;gt;"&lt;/font&gt;&lt;font color='black'&gt;)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&lt;/font&gt;&lt;font color='black'&gt;}&lt;/font&gt;
 &lt;/div&gt;

&lt;p&gt;Note the BR on the end there.  That's not valid.  Apparently FFox handled this bad code by kicking the BRs to the head of the table.  A simple fix to a problem that had me in mug busting mood BIG TIME.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-600238390324728483?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/600238390324728483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=600238390324728483' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/600238390324728483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/600238390324728483'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/03/mystery-white-space-before-table.html' title='Mystery white space before a table'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-2174169859339658337</id><published>2007-03-05T09:27:00.000-08:00</published><updated>2007-03-19T07:05:20.414-07:00</updated><title type='text'>Dynamic Assignment of Event Handlers - A generic rollover event</title><content type='html'>Rollovers are so often done badly and you have to write code for every image.  No more.  It is much better to use some code as follows to make a generic function and then apply it generically as I have using the class attribute.
&lt;br&gt;&lt;br&gt;
 &lt;div class='code'&gt;
&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;html&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;head&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;script&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;function&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;start(){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;els&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;document&lt;/font&gt;&lt;font color='black'&gt;.getElementsByTagName(&lt;/font&gt;&lt;font color='#808080'&gt;'img'&lt;/font&gt;&lt;font color='black'&gt;)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(i&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='maroon'&gt;0&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;i&amp;lt;els.length&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;i++){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;if&lt;/font&gt;&lt;font color='black'&gt;(els[i].className&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;==&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;"rollover"&lt;/font&gt;&lt;font color='black'&gt;){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;els[i].onmouseover&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;swap&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;els[i].onmouseout&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;swap&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;function&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;swap(){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;src&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;this&lt;/font&gt;&lt;font color='black'&gt;.src&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;pos&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;this&lt;/font&gt;&lt;font color='black'&gt;.src.indexOf(&lt;/font&gt;&lt;font color='#808080'&gt;"_over"&lt;/font&gt;&lt;font color='black'&gt;)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;tmp&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;new&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;Image()&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&lt;/font&gt;&lt;font color='black'&gt;(pos&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;==&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;-&lt;/font&gt;&lt;font color='maroon'&gt;1&lt;/font&gt;&lt;font color='black'&gt;){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmp.src&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;src.substring(&lt;/font&gt;&lt;font color='maroon'&gt;0&lt;/font&gt;&lt;font color='black'&gt;,src.length-&lt;/font&gt;&lt;font color='maroon'&gt;4&lt;/font&gt;&lt;font color='black'&gt;)&amp;nbsp;+&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;"_over"&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;+&amp;nbsp;src.substring(src.length-&lt;/font&gt;&lt;font color='maroon'&gt;4&lt;/font&gt;&lt;font color='black'&gt;)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/font&gt;&lt;font color='black'&gt;.src&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;tmp.src&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;}&lt;/font&gt;&lt;font color='blue'&gt;else&lt;/font&gt;&lt;font color='black'&gt;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;this&lt;/font&gt;&lt;font color='black'&gt;.src&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;src.substring(&lt;/font&gt;&lt;font color='maroon'&gt;0&lt;/font&gt;&lt;font color='black'&gt;,pos)&amp;nbsp;+&amp;nbsp;src.substring(pos+5)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;script&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;head&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;body&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;onload&lt;/font&gt;&lt;font color='blue'&gt;="start();"&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;img&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;src&lt;/font&gt;&lt;font color='blue'&gt;="x.gif"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;id&lt;/font&gt;&lt;font color='blue'&gt;="hi"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;class&lt;/font&gt;&lt;font color='blue'&gt;="rollover"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;/&gt;&lt;br /&gt;
&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;body&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;html&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;
 &lt;/div&gt;
&lt;p&gt;Doh! Be sure to read &lt;a href="http://bustedmug.blogspot.com/2007/03/dynamic-assignment-of-event-handlers.html"&gt; the update&lt;/a&gt; to this post, too. I forgot to preload those images :x&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-2174169859339658337?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/2174169859339658337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/2174169859339658337'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/03/dynamic-assignment-of-event-handlers.html' title='Dynamic Assignment of Event Handlers - A generic rollover event'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-8545942667419175303</id><published>2007-03-02T07:19:00.000-08:00</published><updated>2007-03-02T07:34:25.284-08:00</updated><title type='text'>The External JavaScript File (.JS) Caching Dilemma</title><content type='html'>The apps I work on always seem to run into issues because users have cached old versions of our external javascript files.  I'll add a call to a new function defined in a .js to a page and the user's browser will puke because it is using the cached version.  No good.
&lt;br&gt;&lt;br&gt;
While looking for a way to prevent my .js files from being cached I ran across this: &lt;a href="http://www.divinentd.com/2005/08/preventing-javascript-file-caching.html"&gt;DivineNTD.com Journal: Preventing JavaScript File Caching&lt;/a&gt;
&lt;br&gt;&lt;br&gt;
That doesn't really solve the problem since you're just changing source, but I'll take it.  It will keep your .js file at the newest version.  Dirty, but effective.
&lt;br&gt;&lt;br&gt;
To push the solution forward a little, what I've decided to do is to add a member to a static class that is loaded in the constructor.  I then create one of these when the app is started.  Since I am working in Java and it is compiled, the app will be restarted when new code is introduced.  This means that whenever the app is restarted, the date changes.   I append THAT, after a ? to my .js addresses and voila: .js files are flushed out of the cache only when they are changed.  ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-8545942667419175303?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/8545942667419175303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=8545942667419175303' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/8545942667419175303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/8545942667419175303'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/03/divinentdcom-journal-preventing.html' title='The External JavaScript File (.JS) Caching Dilemma'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-5998203993865050665</id><published>2007-02-07T11:40:00.000-08:00</published><updated>2007-02-07T11:40:38.654-08:00</updated><title type='text'>Error: uncaught exception: Permission denied to call method XMLHttpRequest.open</title><content type='html'>&lt;a href="http://www.captain.at/howto-ajax-permission-denied-xmlhttprequest.php"&gt;Error: uncaught exception: Permission denied to call method XMLHttpRequest.open&lt;/a&gt;: &lt;blockquote&gt;"
If the page with the XMLHttpRequest is on a http:// URI (on a webserver), it is not possible to fetch data from another domain!!! This is a security measure of Mozilla/Firefox.
Still, it comes in handy, if you can read remote data from a local application. E.g. you've got a local XUL application that needs to get data from other servers - Dude! Sweet! :-)"&lt;/blockquote&gt;

The bane of my web 2.0 existance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-5998203993865050665?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/5998203993865050665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=5998203993865050665' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/5998203993865050665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/5998203993865050665'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/02/error-uncaught-exception-permission.html' title='Error: uncaught exception: Permission denied to call method XMLHttpRequest.open'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-6300588403964029163</id><published>2007-01-25T13:56:00.000-08:00</published><updated>2007-01-25T14:15:35.495-08:00</updated><title type='text'>OnBeforeUnload, IE7, Assigning event handlers to null and the problems that arise</title><content type='html'>This IE7 issue almost totally screwed me at work.  Image if a JS designed to keep users from leaving a page before placing their order suddenly started telling all users that they were leaving and their orders weren't being placed, even though they were.  Ouch.. that'd probably have someone gunning for my job.  But that almost happened.  Here's how MSoft and sucky IE7 almost did it to me:

I had a script like this.
&lt;div class='code'&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;script&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;window&lt;/font&gt;&lt;font color='black'&gt;.onbeforeunload&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;confirmExit&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;confirmExit()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;return&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;"Leaving&amp;nbsp;this&amp;nbsp;page&amp;nbsp;will&amp;nbsp;cause&amp;nbsp;all&amp;nbsp;unplaced&amp;nbsp;orders&amp;nbsp;to&amp;nbsp;be&amp;nbsp;discarded.&amp;nbsp;&amp;nbsp;Are&amp;nbsp;you&amp;nbsp;sure&amp;nbsp;you&amp;nbsp;want&amp;nbsp;to&amp;nbsp;leave&amp;nbsp;the&amp;nbsp;page?"&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;script&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;input&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;type&lt;/font&gt;&lt;font color='blue'&gt;="image"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;src&lt;/font&gt;&lt;font color='blue'&gt;="/lgrequest.gif"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;onclick&lt;/font&gt;&lt;font color='blue'&gt;="javascript:&amp;nbsp;window.onbeforeunload&amp;nbsp;=&amp;nbsp;null;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.forms[0].submit();"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;/&gt;&lt;/font&gt;
 &lt;/div&gt;

Apparently IE7 doesn't like the part where I set onBeforeUnload = null;  SO it just ignored that.  The result would have been disaster but for a stroke to testing luck.  Here's the simple yet crucial change that I made:

 &lt;div class='code'&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;script&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;goodExit&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;window&lt;/font&gt;&lt;font color='black'&gt;.onbeforeunload&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;confirmExit&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;confirmExit()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;if&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(!goodExit)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;return&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;"Leaving&amp;nbsp;this&amp;nbsp;page&amp;nbsp;will&amp;nbsp;cause&amp;nbsp;all&amp;nbsp;unplaced&amp;nbsp;orders&amp;nbsp;to&amp;nbsp;be&amp;nbsp;discarded.&amp;nbsp;&amp;nbsp;Are&amp;nbsp;you&amp;nbsp;sure&amp;nbsp;you&amp;nbsp;want&amp;nbsp;to&amp;nbsp;leave&amp;nbsp;the&amp;nbsp;page?"&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;script&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;input&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;type&lt;/font&gt;&lt;font color='blue'&gt;="image"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;src&lt;/font&gt;&lt;font color='blue'&gt;="&amp;lt;%=AppService.BASEDIR%&amp;gt;/images/lgrequest.gif"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;onclick&lt;/font&gt;&lt;font color='blue'&gt;="javascript:&amp;nbsp;goodExit&amp;nbsp;=&amp;nbsp;true;&amp;nbsp;window.onbeforeunload&amp;nbsp;=&amp;nbsp;null;&amp;nbsp;document.forms[0].submit();"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;/&gt;&lt;/font&gt;
 &lt;/div&gt; 
I know I have mentioned it before but IE7 sucks!  I use it at work and I must admit the new tab interface works nicely, but all the crap they changed makes me say "IE7 SUCKS"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-6300588403964029163?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/6300588403964029163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=6300588403964029163' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/6300588403964029163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/6300588403964029163'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/01/onbeforeunload-ie7-assigning-event.html' title='OnBeforeUnload, IE7, Assigning event handlers to null and the problems that arise'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-116907103384364783</id><published>2007-01-17T13:57:00.000-08:00</published><updated>2007-01-17T13:57:14.166-08:00</updated><title type='text'>Disable Just-in-time debugging after installing IE developer toolbar</title><content type='html'>&lt;p&gt;If you are now stuck with a window that opens asking if you'd like to debug the current page after every page load, you're I am, or was.  I was pulling my hair out over that stupid box forever because I couldn't figure out how to shut the danged thing off.  It turned itself on WITHOUT ASKING when I installed the IE7 developer toolbar.  It didn't bother me too too much because I hate IE7 anyway :)

&lt;p&gt;So I finally came upon the fix today.  Below is the reference:

&lt;p&gt;&lt;a href="http://www.feedreader.com/node/681"&gt;Life Hacker--Just in Time Debugging? | What is RSS Feedreader? | Feedreader - Totally Free RSS / ATOM Newsreader / Aggregator&lt;/a&gt;

&lt;p&gt;Basically go (in IE, not the toolbar b/c that would make sense) to tools&gt;internet options&gt;advanced and uncheck the debug scripts boxes (there are two types).  Then you're pop-up free.  Yay!  This is why I hate you, MS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-116907103384364783?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/116907103384364783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=116907103384364783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116907103384364783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116907103384364783'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/01/disable-just-in-time-debugging-after.html' title='Disable Just-in-time debugging after installing IE developer toolbar'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-116863225958006593</id><published>2007-01-12T12:04:00.000-08:00</published><updated>2007-01-12T12:33:28.656-08:00</updated><title type='text'>IE7 SUCKS</title><content type='html'>&lt;p&gt;I was recently forced to download IE7.  It sucks.  IE7 sucks.  Ok, now I've done my part.  I truly don't like IE7 at all (the interface is really crappy and it messes with relative image paths) and apparently the world agrees.  Check out this article: &lt;a href="http://www.marketingpilgrim.com/2006/02/microsoft-ie-70-sucks.html"&gt;Microsoft Internet Explorer (IE) 7.0 Sucks! | Marketing Pilgrim&lt;/a&gt;.  In it there is a study done about the number of people posting "IE7 Sucks" and how there's a massive disapproval of Gates' latest.  That warms my heart ;)

&lt;p&gt;In all seriousness though, I have beef with IE7.  At first glance I couldn't even use it.  I don't know why MSoft likes this interface, but I like to be able to use things.  I can't use this.  It isn't intuitive and I'm a developer!  My guess is that it is designed this was to match the new office which &lt;i&gt;supposedly&lt;/i&gt; has made leaps and bounds in usability by re-orging their menus and using pictures.  That remains to be seen in my book, but if they have figured out an easy to use interface, they didn't share the whole story with the IE team because their version stinks.

&lt;p&gt;Also, this anti-phishing stuff is for the birds.  Since when is MSoft the authority on who is worthy of trust and not breaking the law?  Ha ha right right you got me, since they started enforcing copyright laws on their own.  Really though, I'm not comfortable with that.

&lt;p&gt;Anyhow, when it comes to the browser wars, Ffox is still winning me over.  Opera is good and I really like the interface.  It is much neater and cleaner than the competition.  I'm all about adhering to standards too.  However until someone else will spell check the post I'm writing right now as I type it like Ffox does, they're my default browser ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-116863225958006593?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/116863225958006593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=116863225958006593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116863225958006593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116863225958006593'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/01/ie7-sucks.html' title='IE7 SUCKS'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-116843889622459686</id><published>2007-01-10T06:21:00.000-08:00</published><updated>2007-01-10T06:21:36.850-08:00</updated><title type='text'>OnBeforeUnload Event WORKS IN FIREFOX, TOO!!!</title><content type='html'>&lt;p&gt;A page on the MSDN is erroneously spreading the notion that onBeforeUnload is supported only by IE.
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeunload.asp"&gt;onbeforeunload Event (BODY, FRAMESET, window)&lt;/a&gt;
&lt;p&gt;That is totally false.  FireFox has supported onBeforeUnload since version 1.7.  The reason there is beef about this event is that it is not a part of either the W3C spec or the ECMA spec.  However, it has taken on wide support because it provides necessary functionality.  It is used mainly to keep a user from navigating away from a page where they have unsaved input (more for web apps than pages).  
&lt;p&gt;So by all means use onBeforeUnload if you need that kind of functionality as it is likely to be adopted into some standard due to it's far reaching use (even Google does it).  Just be sure that you script something for onUnload for the Opera users.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-116843889622459686?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/116843889622459686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=116843889622459686' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116843889622459686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116843889622459686'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/01/onbeforeunload-event-works-in-firefox.html' title='OnBeforeUnload Event WORKS IN FIREFOX, TOO!!!'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-116827845415324805</id><published>2007-01-08T09:47:00.000-08:00</published><updated>2007-01-08T09:48:32.506-08:00</updated><title type='text'>XMLHttpRequest is not allowed to other domains in Firefox</title><content type='html'>&lt;a href="http://www.thescripts.com/forum/thread585271.html"&gt;XMLHttpRequest problem with Firefox and Netscape - Javascript / DHTML / Ajax&lt;/a&gt;

&lt;p&gt;TheScripts is yet again my muse.  This post is to a person who ran into exactly the same problem as I myself did my first time working with web services.  The natural desire is to call a bunch of web services to mash up some resources you have available.  This is all well and good until you try to get at resources not found underneath the same domain.

&lt;p&gt;In order to prevent malicious web pages from telling your browser to call all manner of nasty XML resources when you load it up, the good folks at mozilla (and maybe IE now too - I'm not sure) won't let billie.com/home.html call a web service (or ajax or anything) hosted at susie.com/ws/stockticker.xml.  

&lt;p&gt;This keeps us secure but is WAAAAYYYY annoying if you happen to be a developer on billie.com who needs to get at that stock ticker.  What you've got to do is build billie.com/ajax/tickerCaller.xml which just makes a call (on the server side of course) to susie's stock ticker and returns the XML.  

&lt;p&gt;It ain't pretty, but until some new fangled security comes out, that's what we're stuck with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-116827845415324805?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/116827845415324805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=116827845415324805' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116827845415324805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116827845415324805'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/01/xmlhttprequest-is-not-allowed-to-other.html' title='XMLHttpRequest is not allowed to other domains in Firefox'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-116802551310350006</id><published>2007-01-05T11:29:00.000-08:00</published><updated>2007-01-10T14:13:09.600-08:00</updated><title type='text'>The Code from my last post with my new colorizer ;)</title><content type='html'>&lt;div class='code'&gt;
&lt;font color='blue'&gt;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;lilPx&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;"200px"&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//size&amp;nbsp;of&amp;nbsp;small&amp;nbsp;select&amp;nbsp;box&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;bigPx&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;"600px"&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//size&amp;nbsp;of&amp;nbsp;large&amp;nbsp;select&amp;nbsp;box&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;prefix&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;'bs'&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//prefix&amp;nbsp;used&amp;nbsp;on&amp;nbsp;all&amp;nbsp;select&amp;nbsp;box&amp;nbsp;IDs&lt;br /&gt;
&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;document&lt;/font&gt;&lt;font color='black'&gt;.onmouseover&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;shrinkAll&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//handles&amp;nbsp;abandoned&amp;nbsp;selections&amp;nbsp;(no&amp;nbsp;change)&lt;br /&gt;
&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;function&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;resize(id){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//get&amp;nbsp;the&amp;nbsp;element&amp;nbsp;in&amp;nbsp;question&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;elem&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;document&lt;/font&gt;&lt;font color='black'&gt;.getElementById(id)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//dynamically&amp;nbsp;init/assign&amp;nbsp;the&amp;nbsp;holder&amp;nbsp;variable&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;holder&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;eval&lt;/font&gt;&lt;font color='black'&gt;(&lt;/font&gt;&lt;font color='#808080'&gt;"hold"&lt;/font&gt;&lt;font color='black'&gt;+id)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//if&amp;nbsp;select&amp;nbsp;not&amp;nbsp;being&amp;nbsp;held&amp;nbsp;open&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;if&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(!holder){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//go&amp;nbsp;big-&amp;gt;small&amp;nbsp;or&amp;nbsp;small&amp;nbsp;-&amp;gt;&amp;nbsp;big&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;if&lt;/font&gt;&lt;font color='black'&gt;(elem.style.width&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;==&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;bigPx)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;elem.style.width&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;lilPx&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;elem.style.width&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;bigPx&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;}&lt;/font&gt;&lt;font color='blue'&gt;else&lt;/font&gt;&lt;font color='black'&gt;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;elem.style.width&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;bigPx&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;function&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;hold(id){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//swap&amp;nbsp;the&amp;nbsp;hold&amp;nbsp;value,&amp;nbsp;dynamic&amp;nbsp;of&amp;nbsp;course&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;eval&lt;/font&gt;&lt;font color='black'&gt;(&lt;/font&gt;&lt;font color='#808080'&gt;"hold"&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;+&amp;nbsp;id&amp;nbsp;+&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;"&amp;nbsp;=&amp;nbsp;!hold"&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;+&amp;nbsp;id)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//change&amp;nbsp;size&amp;nbsp;if&amp;nbsp;necessary&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;resize(id)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&lt;/font&gt;&lt;font color='black'&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;function&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;shrink(id){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//get&amp;nbsp;element&amp;nbsp;to&amp;nbsp;shrink&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;elem&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;document&lt;/font&gt;&lt;font color='black'&gt;.getElementById(id)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//set&amp;nbsp;width&amp;nbsp;to&amp;nbsp;small&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;elem.style.width&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;lilPx&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//unhold&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;eval&lt;/font&gt;&lt;font color='black'&gt;(&lt;/font&gt;&lt;font color='#808080'&gt;"hold"&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;+&amp;nbsp;id&amp;nbsp;+&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;"&amp;nbsp;=&amp;nbsp;false"&lt;/font&gt;&lt;font color='black'&gt;)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&lt;/font&gt;&lt;font color='black'&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;function&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;shrinkAll(e){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//be&amp;nbsp;sure&amp;nbsp;we&amp;nbsp;have&amp;nbsp;the&amp;nbsp;real&amp;nbsp;src,&amp;nbsp;not&amp;nbsp;a&amp;nbsp;bubble&amp;nbsp;or&amp;nbsp;trickle!&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;if&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(!e)&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;e&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;window&lt;/font&gt;&lt;font color='black'&gt;.&lt;/font&gt;&lt;font color='blue'&gt;event;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;target&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(&lt;/font&gt;&lt;font color='blue'&gt;window&lt;/font&gt;&lt;font color='black'&gt;.&lt;/font&gt;&lt;font color='blue'&gt;event&lt;/font&gt;&lt;font color='black'&gt;)&amp;nbsp;?&amp;nbsp;e.srcElement&amp;nbsp;:&amp;nbsp;e.target&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//shrink&amp;nbsp;em&amp;nbsp;all&amp;nbsp;except&amp;nbsp;that&amp;nbsp;one&amp;nbsp;that&amp;nbsp;was&amp;nbsp;the&amp;nbsp;source&amp;nbsp;(possibly)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;var&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;selects&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;document&lt;/font&gt;&lt;font color='black'&gt;.getElementsByTagName(&lt;/font&gt;&lt;font color='#808080'&gt;'select'&lt;/font&gt;&lt;font color='black'&gt;)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for&lt;/font&gt;&lt;font color='black'&gt;(i&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='maroon'&gt;0&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;i&amp;lt;selects.length&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;i++){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;if&lt;/font&gt;&lt;font color='black'&gt;(selects[i].id.substring(&lt;/font&gt;&lt;font color='maroon'&gt;0&lt;/font&gt;&lt;font color='black'&gt;,prefix.length)&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;==&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;prefix){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='darkgreen'&gt;//shrink&amp;nbsp;if&amp;nbsp;it&amp;nbsp;wasn't&amp;nbsp;the&amp;nbsp;source&amp;nbsp;(make&amp;nbsp;sure&amp;nbsp;the&amp;nbsp;src&amp;nbsp;isn't&amp;nbsp;parent&amp;nbsp;for&amp;nbsp;&amp;lt;option&amp;gt;&amp;nbsp;in&amp;nbsp;mozilla)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;if&lt;/font&gt;&lt;font color='black'&gt;(selects[i].id&amp;nbsp;!&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;target.id&amp;nbsp;&amp;&amp;&amp;nbsp;selects[i].id&amp;nbsp;!&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;target.parentNode.id&amp;nbsp;){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shrink(selects[i].id)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
}&lt;/font&gt;
 &lt;/div&gt;
 &lt;hr style='height:1px;background-color:#808080' /&gt;
 &lt;span style='font-family:tahoma;font-size:8pt;color:#808080'&gt;Colorized by: &lt;a style='color:#808080' href='http://www.CarlosAg.net/Tools/CodeColorizer/'&gt;CarlosAg.CodeColorizer&lt;/a&gt;&lt;/span&gt;

AND 
 &lt;div class='code'&gt;
&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;html&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;head&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;script&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;type&lt;/font&gt;&lt;font color='blue'&gt;="text/javascript"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;src&lt;/font&gt;&lt;font color='blue'&gt;="script.js"&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;script&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;head&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;body&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;onload&lt;/font&gt;&lt;font color='blue'&gt;=""&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;id&lt;/font&gt;&lt;font color='blue'&gt;="body"&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;div&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;id&lt;/font&gt;&lt;font color='blue'&gt;="outtie"&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;div&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;select&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;style&lt;/font&gt;&lt;font color='blue'&gt;="width:200px;"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;id&lt;/font&gt;&lt;font color='blue'&gt;="bs1"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;onmouseover&lt;/font&gt;&lt;font color='blue'&gt;="resize(this.id);"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;onclick&lt;/font&gt;&lt;font color='blue'&gt;="hold(this.id);"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;onchange&lt;/font&gt;&lt;font color='blue'&gt;="resize(this.id);"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;onmouseout&lt;/font&gt;&lt;font color='blue'&gt;="resize(this.id);"&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;00004546353&amp;nbsp;-&amp;nbsp;MAKROLON&amp;nbsp;TANK&amp;nbsp;TRUCK&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;00004567435&amp;nbsp;-&amp;nbsp;500&amp;nbsp;BARRELS&amp;nbsp;OF&amp;nbsp;POLYOL&amp;nbsp;50&amp;nbsp;KG&amp;nbsp;ea&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;00056463543&amp;nbsp;-&amp;nbsp;POLYURETHANE&amp;nbsp;BLEND&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;00005464354&amp;nbsp;-&amp;nbsp;50%&amp;nbsp;ACID&amp;nbsp;SOLUTION&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;00056875343&amp;nbsp;-&amp;nbsp;50&amp;nbsp;PALLETS&amp;nbsp;OF&amp;nbsp;RANDOM&amp;nbsp;CHEMICALS&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;select&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;br&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;/&gt;&lt;br /&gt;
&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;select&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;style&lt;/font&gt;&lt;font color='blue'&gt;="width:200px;"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;id&lt;/font&gt;&lt;font color='blue'&gt;="bs2"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;onmouseover&lt;/font&gt;&lt;font color='blue'&gt;="resize(this.id);"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;onclick&lt;/font&gt;&lt;font color='blue'&gt;="hold(this.id);"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;onchange&lt;/font&gt;&lt;font color='blue'&gt;="resize(this.id);"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;onmouseout&lt;/font&gt;&lt;font color='blue'&gt;="resize(this.id);"&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;00004546353&amp;nbsp;-&amp;nbsp;MAKROLON&amp;nbsp;TANK&amp;nbsp;TRUCK&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;00004567435&amp;nbsp;-&amp;nbsp;500&amp;nbsp;BARRELS&amp;nbsp;OF&amp;nbsp;POLYOL&amp;nbsp;50&amp;nbsp;KG&amp;nbsp;ea&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;00056463543&amp;nbsp;-&amp;nbsp;POLYURETHANE&amp;nbsp;BLEND&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;00005464354&amp;nbsp;-&amp;nbsp;50%&amp;nbsp;ACID&amp;nbsp;SOLUTION&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;00056875343&amp;nbsp;-&amp;nbsp;50&amp;nbsp;PALLETS&amp;nbsp;OF&amp;nbsp;RANDOM&amp;nbsp;CHEMICALS&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;option&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;select&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;body&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;
&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;html&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;
 &lt;/div&gt;
 &lt;hr style='height:1px;background-color:#808080' /&gt;
 &lt;span style='font-family:tahoma;font-size:8pt;color:#808080'&gt;Colorized by: &lt;a style='color:#808080' href='http://www.CarlosAg.net/Tools/CodeColorizer/'&gt;CarlosAg.CodeColorizer&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-116802551310350006?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/116802551310350006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=116802551310350006' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116802551310350006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116802551310350006'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/01/code-from-my-last-post-with-my-new.html' title='The Code from my last post with my new colorizer ;)'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-116802303755281085</id><published>2007-01-05T10:50:00.000-08:00</published><updated>2007-01-05T11:00:20.243-08:00</updated><title type='text'>&lt;SELECT&gt; options are way too long</title><content type='html'>&lt;a href="http://www.thescripts.com/forum/thread584357.html"&gt;in Select Option entries are cut on the right side if they're too long - Javascript / DHTML / Ajax&lt;/a&gt;

This is another post of mine on TheScripts.  This one is pretty interesting because it is a solution of one of those age-old problems: what the crap are you supposed to do when you have a ton of content in a drop-down.  It looks SUPER ugly if you just stretch it across the whole page.

At first I scoured the web for a way to get the dang lines to wrap.  A few sites I found erroneously pointed to some tard's posting on a forum that said just throw BRs in there.  I looked all over the place in hope that there was a CSS solution but to no avail.  Apparently the HTML select tag can't wrap ever no matter what.  Boooooooo.

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/4611/168/1600/515764/dropdown.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/x/blogger/4611/168/320/251995/dropdown.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;font size="-5"&gt;Above is a screenie.  The top select on each of the two sets is w/ no mouseover, the bottom is when you interact w/ the select.&lt;/font&gt;

Finally, I wrote something of my own.  It won't do wrapping, but it does fix the problem.  I made the select box elastic.  When not in use it is a small little thing with a preview of what the selected option says.  When moused over or clicked it expands long enough to display all of the text, then shrinks back up when you're done with it.  I didn't get really tricky and animate the motion or anything, though that would be neat.  It is just functional at this point.  

The problem got really interesting when I had to deal with event bubble and trickle.  That's such a pain.  I got help from the usual sources - w3schools for reference, quirksmode, Dr. Dailey's page.  I should post a demo but I'm not feeling up to it at the moment.  If you want the src or a demo just comment or snag it from theScripts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-116802303755281085?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/116802303755281085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=116802303755281085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116802303755281085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116802303755281085'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/01/options-are-way-too-long.html' title='&amp;lt;SELECT&amp;gt; options are way too long'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-116785352672066612</id><published>2007-01-03T11:45:00.000-08:00</published><updated>2007-01-03T11:45:27.046-08:00</updated><title type='text'>Most CMS packages are PHP based, why is this? - PHP</title><content type='html'>&lt;a href="http://www.thescripts.com/forum/showthread.php?p=2288719#post2288719"&gt;Most CMS packages are PHP based, why is this? - PHP&lt;/a&gt;

To paraphrase myself (I've taken to posting a lot on theScripts) here's why SO many CMSs seem to be in PHP with a database backend (though the latter seems extremely common sense)

The idea behind CMSs being database driven is because of the following premises: a)If you need a CMS you must have a lot of content to organize and b)Databases are the best way to organize a lot of information so logically it follows that you would use a database to organize all of the information.

The reason PHP is so often used is probably because it is very readable, simple, and well suited for the task. CMSs are not super-technical in nature. I don't mean to put them down because they are good at what they do, but they're a simple tool. You don't need a lot of technical complexity to issue a few queries on the database to get content to the page. That being said, many choose PHP because it is simple, lightweight, and good at doing SQL queries and writing them to a page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-116785352672066612?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/116785352672066612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=116785352672066612' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116785352672066612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116785352672066612'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2007/01/most-cms-packages-are-php-based-why-is.html' title='Most CMS packages are PHP based, why is this? - PHP'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-116593811376471476</id><published>2006-12-12T07:41:00.000-08:00</published><updated>2007-01-12T12:18:51.813-08:00</updated><title type='text'>Dynamically assigned onclick event never executed when clicking link - Javascript / DHTML / Ajax</title><content type='html'>I just conquered an issue I was having with a&lt;a href="http://www.thescripts.com/forum/thread575962.html"&gt;dynamically assigned onclick event never executed when clicking a link (click me for details)&lt;/a&gt;.

Essentially what I ended up coming up with and highly recommend to others is that if, for some insane crazy reason inexplicable even by cold Vulcan logic, your dynamically assigned event handler just WON'T go - do something like this:
&lt;div class='code'&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for&amp;nbsp;(var&amp;nbsp;i=0;i&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;arr.length;i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;a&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;_bsn.DOM.createElement(&lt;/font&gt;&lt;font color='blue'&gt;"div",&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;{&amp;nbsp;bgColor:&lt;/font&gt;&lt;font color='blue'&gt;"white"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;});&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a.innerHTML&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;"&amp;lt;a&amp;nbsp;href=\"#\"&amp;nbsp;onclick=\"selVal(document.getElementById('"+pointer.fld.id+"'),"+arr[i]+");\"&amp;gt;"+arr[i]+"&amp;lt;/a&amp;gt;";&lt;/font&gt;&lt;font color='red'&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;li&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;_bsn.DOM.createElement(&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;"li",&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;{},&amp;nbsp;a&amp;nbsp;&amp;nbsp;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ul.appendChild(&amp;nbsp;&amp;nbsp;li&amp;nbsp;&amp;nbsp;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/font&gt;
 &lt;/div&gt;
 &lt;hr style='height:1px;background-color:#808080' /&gt;
 &lt;span style='font-family:tahoma;font-size:8pt;color:#808080'&gt;Colorized by: &lt;a style='color:#808080' href='http://www.CarlosAg.net/Tools/CodeColorizer/'&gt;CarlosAg.CodeColorizer&lt;/a&gt;&lt;/span&gt;

That is to say, write out a div and fill the innerHTML (even though that a little off standard ;( )  with the element and explicitly write out the event handler.  Then it will take for sure.  Though that seems kinda common sense to me looking back on it, many hours of eye strain when into coming to that solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-116593811376471476?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/116593811376471476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=116593811376471476' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116593811376471476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116593811376471476'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2006/12/dynamically-assigned-oncli_116593811376471476.html' title='Dynamically assigned onclick event never executed when clicking link - Javascript / DHTML / Ajax'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-116585546890570638</id><published>2006-12-11T08:21:00.000-08:00</published><updated>2006-12-11T08:49:56.463-08:00</updated><title type='text'>IE Select z-index bug (w/select-free layer and autosuggest)</title><content type='html'>Recently I ran into one of the biggest nasties I've ever seen.  It is in IE (fixed in 7 thankfully).  When you've got any element over a select box, the select box breaks through and shows on the top.  It is a real bugger to fix.  &lt;a href="http://www.brainjar.com/css/positioning/default5.asp"&gt;This page&lt;/a&gt; INCORRECTLY throws in the towel and says you can't fix it so just alter your design.  To it's credit, it does sum up the problem pretty well and has a nice pic:
&lt;img src="http://www.brainjar.com/css/positioning/graphics/ie5.5.gif" style="float:right;" /&gt;
I ran into this while implementing &lt;a href="http://www.brandspankingnew.net/archive/2006/08/ajax_auto-suggest_auto-complete.html"&gt;Autosuggest&lt;/a&gt; which I think is a great UI add-on.  However, you'll run into issues when you autosuggest overtop of a select.  No good.

The solution to the select popping over is called &lt;a href="http://www.hedgerwow.com/360/bugs/css-select-free.html"&gt;Select-free layer&lt;/a&gt;.  It is very interesting.  Don't be confusing by the dragginess of their example.  All it does is filter a hidden iframe though to cover any selects, since an iframe doesn't suffer the bug (unless you have selects on that, then heaven help you).  In a nutshell they use this css:
&lt;blockquote&gt;&amp;lt;style&amp;gt;

.select-free
{
 position:absolute;
 z-index:10;/*any value*/
 overflow:hidden;/*must have*/
 width:33em;/*must have for any value*/;
}
.select-free iframe
{
 display:none;/*sorry for IE5*/
 display/**/:block;/*sorry for IE5*/
 position:absolute;/*must have*/
 top:0;/*must have*/
 left:0;/*must have*/
 z-index:-1;/*must have*/
 filter:mask();/*must have*/
 width:3000px;/*must have for any big value*/
 height:3000px/*must have for any big value*/;
}

.select-free .bd{border:solid 1px #aaaaaa;padding:12px;}
&amp;lt;/style&amp;gt;

&amp;lt;div class="select-free" id="dd3"&amp;gt;&amp;lt;div class="bd"&amp;gt;
your content here
&amp;lt;/div&amp;gt;&amp;lt;!--[if lte IE 6.5]&amp;gt;&amp;lt;iframe&amp;gt;&amp;lt;/iframe&amp;gt;&amp;lt;![endif]--&amp;gt;&amp;lt;/div&amp;gt;&lt;/blockquote&gt;
I had the agonizing task of integrating this with autosuggest.  It isn't fun.  Some css had to be changed:
&lt;blockquote&gt;
&amp;lt;style type="text/css"&amp;gt;
 /* 
 ===========================
 styling for autosuggest
 ===========================
 */
 
 .autosuggest{
  position:absolute;
  z-index:10;/*any value*/
  overflow:hidden;/*must have*/
  width:100px;/*must have for any value*/;
 }
 
 .autosuggest .bd{border:solid 0px #aaaaaa;padding:0px;}
 
 .autosuggest #mask{
  border: 0px;
    margin: 0px;
  display:none;/*sorry for IE5*/
  display/**/:block;/*sorry for IE5*/
  position:absolute;/*must have*/
  top:0;/*must have*/
  left:0;/*must have*/
  z-index:-1;/*must have*/
  filter:mask();/*must have*/
  width:3000px;/*must have for any big value*/
  height:3000px/*must have for any big value*/;
 }

 ul.autosuggest
 {
  //position: absolute;
  list-style: none;
  margin: 0;
  padding: 0;
  //overflow-y: auto;
 }
 
 ul.autosuggest li
 {
  text-align: left;
  border-bottom: 1px solid blue;
  border-left: 1px solid blue;
  border-right: 1px solid blue;
 }
 
 ul.autosuggest li a:link,
 ul.autosuggest li a:visited
 {
  display: block;
  padding: 0px;
  text-decoration: none;
  text-color: black;
  background-color: #EEEEEE;
 }

 ul.autosuggest li a:hover,
 ul.autosuggest li a:active
 {
  color: #fff;
  background-color: green;
 }

 ul.autosuggest li.highlight a:link,
 ul.autosuggest li.highlight a:visited
 {
  color: #fff;
  background-color: green;
 }
 
 
&amp;lt;/style&amp;gt;&lt;/blockquote&gt;
(mask is the id of my iframe btw) and then I had to change some of BSN's javascript to support select-free layer:
&lt;blockquote&gt;_bsn.AutoSuggest.prototype.createList = function(arr)
{
 // clear previous list
 //
 this.clearSuggestions();

 // create and populate ul
 //
 var ulWrap = _bsn.DOM.createElement("div", { id:this.idAs, className:this.oP.className });
 var ulCont = _bsn.DOM.createElement("div", { id:"inner", className:"bd" });
 var ul = _bsn.DOM.createElement("ul", {id:this.idAs+"ul", className:this.oP.className});
  
 var pointer = this;
 for (var i=0;i&amp;lt;arr.length;i++)
 {
  var a = _bsn.DOM.createElement("a", { href:"#" }, arr[i]);
  a.onclick = function () { pointer.setValue( this.childNodes[0].nodeValue ); return false; }
  var li = _bsn.DOM.createElement(  "li", {}, a  );
  ul.appendChild(  li  );
 }
 
 var pos = _bsn.DOM.getPos(this.fld);
 
 ulWrap.style.overflow = "hidden";
 ulWrap.style.left = pos.x + "px";
 ulWrap.style.top = ( pos.y + this.fld.offsetHeight ) + "px";
 ulWrap.onmouseover = function(){ pointer.killTimeout() }
 ulWrap.onmouseout = function(){ pointer.resetTimeout() }
 ul.style.width = this.fld.offsetWidth + "px";
 ulCont.style.width = this.fld.offsetWidth + "px";
 ulWrap.style.width = this.fld.offsetWidth + "px";
 ulCont.style.height = ((ul.childNodes.length-1) * (this.fld.offsetHeight+2)+6);
 ulWrap.style.height = ((ul.childNodes.length-1) * (this.fld.offsetHeight+2)+6);
 
 
 ulCont.appendChild(ul);
 ulWrap.appendChild(ulCont);
 ulWrap.innerHTML += "&amp;lt;!--[if lte IE 6.5]&amp;gt;&amp;lt;iframe id=\"mask\"&amp;gt;&amp;lt;/iframe&amp;gt;&amp;lt;![endif]--&amp;gt;";
 //document.getElementsByTagName("body")[0].appendChild(ul);
 document.getElementsByTagName("body")[0].appendChild(ulWrap);&lt;/blockquote&gt;
In the end it was a real bugger to get going but sure enough my auto suggest is no longer broken by IE's stupid bug.  I hope this helps any other poor souls that face this task.  If you suffer from IE's select bug at all I highly recommend select-free layer.  If I wasn't doing autosuggest too it would have been an easy patch to apply.  I hate IE btw ;)  They made me play DHTM-Hell for a few days this time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-116585546890570638?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/116585546890570638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=116585546890570638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116585546890570638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116585546890570638'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2006/12/ie-select-z-index-bug-wselect-free.html' title='IE Select z-index bug (w/select-free layer and autosuggest)'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-116542748101148329</id><published>2006-12-06T09:51:00.000-08:00</published><updated>2006-12-06T09:51:21.013-08:00</updated><title type='text'>Javascript date sorting using regular expressions</title><content type='html'>First off, let me say that &lt;a href="http://javascript.about.com/mbiopage.htm"&gt;this guy&lt;/a&gt; is awesome.  I've referenced many of his articles over the years and they're all very helpful.

Specifically, I used his &lt;a href="http://javascript.about.com/library/blsort3.htm"&gt;Date Sort&lt;/a&gt; article today.  I was dealing with an array of dates in javascript and needed to order them.  The functions he lists use a regular expression.  These are rather funky to look at:
&lt;blockquote&gt;var dateRE = /^(\d{2})[\/\- ](\d{2})[\/\- ](\d{4})/;&lt;/blockquote&gt;
but extremely useful and elegant.  He also offers functions like: 
&lt;blockquote&gt;
function mdyOrdA(a, b){
a = a.replace(dateRE,"$3$1$2");
b = b.replace(dateRE,"$3$1$2");
if (a &amp;gt; b) return 1;
if (a &amp;lt; b) return -1;
return 0; }
&lt;/blockquote&gt;
that you can use with Array's sort method to elegantly sort like so:
&lt;blockquote&gt;
dateArray = new Array('15/10/2000','28/05/1999',
'17/09/2005','06/12/2004','02/01/1998');
dateArray.sort( mdyOrdA );
document.write('Ascending : ' + dateArray + '&lt;br /&gt;');
&lt;/blockquote&gt;
Bravo, Mr. Chapman!  Very elegant.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-116542748101148329?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/116542748101148329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=116542748101148329' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116542748101148329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116542748101148329'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2006/12/javascript-date-sorting-using-regular_06.html' title='Javascript date sorting using regular expressions'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37672055.post-116542701185288547</id><published>2006-12-06T09:43:00.000-08:00</published><updated>2006-12-06T09:43:36.746-08:00</updated><title type='text'>JS Array hax: Push Pop Shift and Unshift</title><content type='html'>&lt;a href="http://www.devguru.com/technologies/ecmascript/QuickRef/array.html"&gt; These incredibly useful array methods&lt;/a&gt; are often overlooked and under utilized.  When used properly, if for some reason you need to change your code from appending an array to pre-pending it, you just change from push() to unshift().  It should take all of two seconds.  Without using these functions you'll end up writing 10 lines or so that are SOOOOOO boring you'll want to barf.  

Here's a quick reference of what they do:
push() - add element to the end of the array
pop() - remove and return the element at the end
shift() - remove and return the element at the beginning
unshift() - add element to the beginning of the array pushing the others down 1

Shift and unshift seem to me to save the most time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37672055-116542701185288547?l=bustedmug.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bustedmug.blogspot.com/feeds/116542701185288547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=37672055&amp;postID=116542701185288547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116542701185288547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37672055/posts/default/116542701185288547'/><link rel='alternate' type='text/html' href='http://bustedmug.blogspot.com/2006/12/js-array-hax-push-pop-shift-and.html' title='JS Array hax: Push Pop Shift and Unshift'/><author><name>Brando</name><uri>http://www.blogger.com/profile/16369676054909411805</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04241472061442821197'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>