<?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' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-30441114</id><updated>2011-10-07T00:09:22.115-05:00</updated><category term='Coffee'/><category term='Junk'/><category term='AJax'/><category term='W3C Standards'/><category term='CSS'/><category term='Java Web Start'/><category term='Im just saying'/><category term='Photosynth'/><category term='bug fix'/><category term='Links'/><category term='Safari'/><category term='Hibernate'/><category term='JNLP'/><category term='scriptaculous'/><category term='Prototype'/><category term='Eclipse Plugin'/><category term='JavaScript'/><category term='Java'/><category term='Lead'/><category term='Healthcare'/><title type='text'>Going On A Safari...</title><subtitle type='html'>A few years ago I started this blog to try and document some issues I encountered with Apple's Safari browser, but since then, the three major browsers (Safari, FireFox, and IE7) have done a better job of converging upon common standards.

Now this has become a little more diverse.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-30441114.post-3546047862495489882</id><published>2009-05-19T14:01:00.005-05:00</published><updated>2009-05-19T14:29:16.592-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='scriptaculous'/><category scheme='http://www.blogger.com/atom/ns#' term='bug fix'/><title type='text'>Scriptaculous Autocomplete Page Jump Using Arrow Keys</title><content type='html'>Good find Jason Gill!&lt;br /&gt;&lt;br /&gt;I implemented a script.aculo.us Ajax.Autocompleter only to find a serious behavioral problem where the use of the arrow keys would cause the page to jump all over.&lt;br /&gt;&lt;br /&gt;Jason found a nice and easy way to tame the wild beast.&lt;br /&gt;&lt;br /&gt;The only negative to the fix is that the original controls.js source code needs to be modified, but until the bug is fixed in the main source stream, that is just fine with me.  The only gotcha will be if the next update to script.aculo.us does not contain a fix for this problem, trying to remember that the source code needs to be modfied.  This gotcha will still be an issue if an external fix would make a modification to the Autocompleter.Base for the patch would need to be removed when the code base is finally fixed.  So it boils down to six of one or half a dozen of another; so my choice is to go with what Jason has since it works.&lt;br /&gt;&lt;br /&gt;Once again, great find Jason!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;References:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.gilluminate.com/2009/01/20/scriptaculous-autocomplete-page-jump-using-arrow-keys/"&gt;http://blog.gilluminate.com/2009/01/20/scriptaculous-autocomplete-page-jump-using-arrow-keys/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleter"&gt;http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleter&lt;/a&gt;&lt;br /&gt;&lt;a href="https://prototype.lighthouseapp.com/projects/8887/tickets/33-problem-with-scrolling-on-div-tags"&gt;https://prototype.lighthouseapp.com/projects/8887/tickets/33-problem-with-scrolling-on-div-tags&lt;/a&gt; (The actual bug)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-3546047862495489882?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blog.gilluminate.com/2009/01/20/scriptaculous-autocomplete-page-jump-using-arrow-keys/' title='Scriptaculous Autocomplete Page Jump Using Arrow Keys'/><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/3546047862495489882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=3546047862495489882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/3546047862495489882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/3546047862495489882'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2009/05/scriptaculous-autocomplete-page-jump.html' title='Scriptaculous Autocomplete Page Jump Using Arrow Keys'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-5876798681224219596</id><published>2009-04-23T11:28:00.001-05:00</published><updated>2009-05-04T13:35:16.360-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><title type='text'>JavaScript: The Web Glue</title><content type='html'>Please see &lt;a href="http://www.partner-technology.com/the-web-glue"&gt;http://www.partner-technology.com/the-web-glue&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;JavaScript: The Web Glue&lt;/h1&gt;                              &lt;div class="content"&gt;     &lt;p&gt;By Scott Tabar&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;A Sticky Situation&lt;/strong&gt;&lt;br /&gt;The use of JavaScript has evolved over the last thirteen years since the first drafts of the standard were introduced in 1996.  In the late nineties, and into the early years of the new millennium, I personally witnessed many amazing things that people were trying to do with JavaScript.  Unfortunately I was not a casual observer, but instead I was stuck with trying to make them work which resulted in the formation of an opinion that it may be best to avoid JavaScript.&lt;br /&gt;&lt;br /&gt;Plain and simple, JavaScript was difficult to work with and usually became the dysfunctional keystone of many projects that tried to place lofty demands upon a technology that few understood well, but were eager to try to exploit.  There were many great challenges with cross-browser compatibility, debugging, and manipulations of the Document Object Model (DOM) along with HTML.  Some projects did not place a high priority on JavaScript and therefore could not justify the fulltime dedication of one developer to work through all the issues.  As a result, JavaScript's role on many projects was minimal.&lt;br /&gt;&lt;br /&gt;Fortunately, JavaScript and the web development mindset have been evolving - today's web development landscape is very different from what it used to be.  Now, open source projects are bringing together diverse resources and perspectives that are fueling the advancement and adoption of newer technology.  We are now witnessing that standards are a driving goal for browser development, unlike almost a decade ago when the urge to add in those “killer” features inevitably led to incompatibility issues.  Technological advances, no matter how great, cannot usher in new paradigm shifts if the masses cannot access it or utilize it.  In web development, there has to be a commitment to implement the new technology, and without having a viable way to utilize it, the inertia of the development cycle could start to wane.  With Web 2.0 there has been a driving demand to make use of newer technology and standards that are easily accessible for both the web developer and the end user. JavaScript is helping to make it happen now.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;JavaScript Glues it Together&lt;/strong&gt;&lt;br /&gt;In many ways, JavaScript is the glue that holds the Web 2.0 together.  It enhances many aspects of the web development environment and the client experience.  On the server side, the benefits include smaller transactions that yield faster responses, less network traffic, and it effectively off-loads some of the processing to the client's computer.  For the client, a few of the benefits are faster response times, dynamic content both in animation and in targeted content based upon the users real-time actions, and web pages that behave more like desktop applications.  JavaScript allows the content to be client-driven, only requiring access to the servers for resources that are of interest to the user.&lt;br /&gt;&lt;br /&gt;JavaScript glues together many aspects of the client's experience.  It can manipulate how the CSS elements interacts with a page based upon user initiated events.  JavaScript is able to navigate the DOM and work with the data elements on the web page, or it can use the DOM to directly modify the structure of the page.  JavaScript is also capable of adding regular application functionality to web pages through the use of drag and drop, event monitoring and handling, and transparently connecting to remote resources.  JavaScript frees the page from having to be a static representation of the content with Asynchronous JavaScript + XML (AJax).  AJax can become the major backbone for most of the communications with the server, thus freeing the client from having to wait for the whole web page to reload when updating even the smallest bit of content.&lt;br /&gt;&lt;br /&gt;With all of the possibilities of what JavaScript has to offer, one of its top strengths is that it provides an excellent opportunity for enhancement.  The core fundamentals of the language can be dynamically enhanced without recompiling the execution kernel.  By being an interpreted language with object oriented (OO) structure, it only simplifies what is possible.  This flexibility results in a lower cost to implement and simplifies integration into an existing site.  The ability to extend its functionality has allowed JavaScript to remain a key player in the Web 2.0 environment; otherwise, dependencies upon other external scripting environments would become a necessity.  Numerous libraries have capitalized on the ease of working with JavaScript.  The purpose of these libraries varies; they can be narrowly focused or very broad in scope.  Some of these libraries are stand alone, while some build upon other libraries.&lt;br /&gt;&lt;br /&gt;PrototypeJS is one such library that provides a framework that bridges the gap on cross-browser compatibility, provides convenient functionality to help simplify JavaScript programming, and provides a rich AJax interface.  PrototypeJS is able to simplify many mundane and complex tasks, which leads to tighter code and fewer bugs.  PrototypeJS's functionality bridges the three layers of architectural design: Behavior (JavaScript), Presentation (CSS), and Content (HTML and Data).  PrototypeJS has implemented support for using the W3C's CSS Level 3 specifications, so it is trivial to manipulate a page based upon the use of CSS selectors even if the client's browser of choice does not support the CSS Layer 3 specifications.  As a result of CSS Level 3 support, it becomes a trivial matter to stripe every other table row, select the nth element in a list, or even empty elements.  PrototypeJS also excels with managing data with extended data types and rich tools sets.  Utilizing JavaScript libraries prevents developers from reinventing the wheel and takes advantage of solutions that work in cross-browser environments.&lt;br /&gt;&lt;br /&gt;Script.aculo.us builds upon PrototypeJS to focus on manipulating the Presentation layer to provide dynamic animation and transformations of web pages.  Some examples includes drag-n-drop, fading content out or in, inserting a new element on the page, or just morphing content from one CSS entry to another.  Script.aculo.us has a toolbox of many effects that can be combined in novel ways, very much like how video editing software utilizes transitions.  It also has the infrastructure in place to utilize queues to allow multiple transitions to run concurrently, or sequentially.  This allows websites to take on a life of their own through content that interacts with the user, instead of just being static.&lt;br /&gt;&lt;br /&gt;With the added richness comes the price of development and learning how to take advantage of the strengths of what JavaScript has to offer.  Usually the greatest challenges tend to deal with debugging and integration with the CSS and the DOM.  There are tools that make it much easier to figure out where the bugs are or why something is not behaving correctly on all platforms.  FireFox along with FireBug helps to address debugging and dynamic tweaking of content.  Safari also has its own built in developer's menu that is able to accomplish many of the same things as FireBug.  With the big three browsers (FireFox, Safari, and IE) focusing on standards compliance, it is becoming easier to develop cross-browser compliant pages.  Today it is true that if it works in one browser you have better odds that it will work in the others.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Glue for the Glue&lt;/strong&gt;&lt;br /&gt;JavaScript is not perfect.  There are still issues with compatibility between various browsers, but libraries such as PrototypeJS are helping to address some of those issues.  Some tools provide better client-side debugging than others, but trying to incorporate an intelligent debugging tool that can interact with JavaScript, the DOM, and related CSS styles in a useful and an intuitive way may be more of a personal preference to the developer.&lt;br /&gt;&lt;br /&gt;With the use of Ajax and other multiple threaded JavaScript tasks, a significant problem exists with thread contention since JavaScript is generally not thread-safe.  If a website has multiple threads working to update content asynchronously there can be problems if each thread shares the same element or has the same targets.  If many threads are run concurrently, events can be lost and critical functionality associated with the functions that are listening for those events will then go unprocessed.  One possible solution is to implement your own MutEx in JavaScript so that you can mitigate concurrency issues through self-handled synchronization.  JavaScript could benefit from the addition of thread-safe object handling, even if it could be enabled on demand.&lt;br /&gt;&lt;br /&gt;Surprisingly, even though it appears like JavaScript itself has not undergone too many changes from when the first draft was published, it has been proven to be flexible and has become an integral component for most web pages.  JavaScript has rendered static web pages obsolete.  It has successfully glued the web together for our surfing pleasure.&lt;/p&gt;   &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-5876798681224219596?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.partner-technology.com/the-web-glue' title='JavaScript: The Web Glue'/><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/5876798681224219596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=5876798681224219596' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/5876798681224219596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/5876798681224219596'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2009/04/javascript-web-glue.html' title='JavaScript: The Web Glue'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-4727980303673149641</id><published>2008-08-30T15:17:00.003-05:00</published><updated>2008-08-30T15:28:53.097-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Photosynth'/><title type='text'>Photosynth</title><content type='html'>Last Thursday I happened to stumble upon an interesting site that allows you to take multiple photos and combine them into a 3-D model.  That happened to be the day they rolled it out to the general public.  I was able to put together a synth that was 100% synthy on the first try which was beginner's luck and perhaps a little spoiling too.&lt;br /&gt;&lt;br /&gt;Since then I have put together about 4 major synths, and I have tried to revisit each of them a few different times to try and get them to be 100% synthy. &lt;br /&gt;&lt;br /&gt;NOTE: I will be expanding upon this in the next few weeks, please check back.   This is not nearly complete yet, sorry...&lt;br /&gt;&lt;br /&gt;There have been some challenges with Photosynth that I have come across and I have been able to address some of them too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-4727980303673149641?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://photosynth.net' title='Photosynth'/><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/4727980303673149641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=4727980303673149641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/4727980303673149641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/4727980303673149641'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2008/08/photosynth.html' title='Photosynth'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-5256976078727426350</id><published>2008-05-28T13:39:00.004-05:00</published><updated>2008-05-28T14:23:43.611-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Im just saying'/><title type='text'>I'm just saying...</title><content type='html'>The phrase "I'm just saying..." is an interesting example of how we can get by with expressing almost anything that happens to be on your mind, without reaping the consequences.  Or at least that is how it has been explained to me, usually with the addition of "I'm just saying..." of which I find to be a bit circular.&lt;br /&gt;&lt;br /&gt;Every once in a while I have a few things pop in to my mind, of which if I happen to share of others, then tend to think the thoughts are rather deep in nature.  Now, I am not tooting my own horn or trying to imply that that I have any delusions of grandeur, but I am just saying...&lt;br /&gt;&lt;br /&gt;Please enjoy, where you can.  ;-)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Little Minds mind little.&lt;br /&gt;Big minds mine big.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This was an interesting creation that I enjoyed about six months ago.  I do like the fact that it is a palindrome (when using words as a unit), but the meaning and enjoyment does go a bit deeper than just that.  What I have noticed when I have shared this with others, is that initially they tend to overlook on the second line, the word "mine" instead of a repeat of "mind" as the pattern was setup in the first line.  This still keeps it a valid palindrome, but to me, it makes it far more humorous in the nature that the individual to whom is speaking this is, in the first line, scolding folks with little minds, but then marvels about how large their mind is, which to me, confirms that that individual last the smallest mind of all.  I personally read the first line's "minds" as a noun referring to the mental faculties and or opinion or views that someone has.  The adjective of little both refers to the diminutive state of someones mental faculties, if you will, due to their warped perspective on humanity (see below), and their lack of caring.  Of which the "mind" in line one is focused on the verb to be concerned about.&lt;br /&gt;&lt;br /&gt;Now what got me thinking about this juxtaposition was that I have been a frequent observer (and dare I say complainer) about how little minded individuals tend to care (mind) that much for other or even that which is around them.  They tend to be out for themselves at any cost.  This could be reflected through racism, hatred, deception, criminal activities such as preying upon the elderly or under privileged, etc.  I'll let you use your own imagination to fill in the examples on who might fit this build. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Another interesting palindrome that I just thought of a few weeks ago is...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Humanity is inhumane.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I think the likes of individuals such as Hitler, Chairman Mao, Stalin, and ect..., or events in modern history such as The Spanish Inquisitions, Salem Witch Hunts, or even events such as the Trail of Tears sums this up succinctly.&lt;br /&gt;&lt;br /&gt;Interesting note, I just Googled this phrase and it appears to be fairly popular with 194 hits, but some are duplicates and circular too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-5256976078727426350?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/5256976078727426350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=5256976078727426350' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/5256976078727426350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/5256976078727426350'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2008/05/im-just-saying.html' title='I&apos;m just saying...'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-4857698262418773912</id><published>2008-02-11T22:23:00.001-05:00</published><updated>2008-02-11T22:35:22.144-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Junk'/><title type='text'>Microsoft's attempt to drive customers to buy macs</title><content type='html'>I must admit, if there is one feature that makes you scratch your head and wonder what the heck the folks at microsoft were smoking on the day they dreamed up that wonderful set of tools called Accessibility Options within XP. &lt;br /&gt;&lt;br /&gt;It may be a great set of tools that for those who need them because of unfortunate handicaps, but the boneheaded folks at microsoft sure did goof on common sense interfaces.&lt;br /&gt;&lt;br /&gt;It behaves like a virus for it can hose your computer without your knowledge and there is no way to permanently disable it.  I am sure many of users have been burned by it.&lt;br /&gt;&lt;br /&gt;I saw that I am not alone in this common snake pit, for the following person summed it up quite nicly:&lt;br /&gt;http://www.classicdosgames.com/blog/?p=3&lt;br /&gt;&lt;br /&gt;I think this one feature alone could cause many folks to seriously consider the Mac platform, if not for any reason other than a good grasp of the concept behind a common human interface design.&lt;br /&gt;&lt;br /&gt;Or perhaps it could also be one of the greatest marketing ploys ever devised, MS to harward manufacturers: "Bundle our OS with your hardware and we will include a software feature that would be sure to increase sales due to physical abuse by users to their hardware."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-4857698262418773912?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/4857698262418773912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=4857698262418773912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/4857698262418773912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/4857698262418773912'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2008/02/microsofts-attempt-to-drive-customers.html' title='Microsoft&apos;s attempt to drive customers to buy macs'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-1089085833054623516</id><published>2008-01-10T11:59:00.001-05:00</published><updated>2008-01-10T12:22:53.830-05:00</updated><title type='text'>Eclipse v3.3.x PermGen Memory Errors</title><content type='html'>Out-of-the-box Eclipse v3.3.x was giving me on average 12 to 16 crashes per day!  I was even seriously considering dropping Eclipse altogether and finding something more stable.&lt;br /&gt;&lt;br /&gt;I was using Eclipse v3.3.1 with the WST extension and tigris.org's subclipse v1.2.0 (since the v2.x has serious bugs that prevents it from installing) on a Windows XP Pro platform.  &lt;br /&gt;&lt;br /&gt;The short of the problems came down to a mistake in the eclipse.ini file that had the &lt;pre&gt;--launcher.XXMaxPermSize&lt;/pre&gt; statement come before the &lt;pre&gt;-vmargs&lt;/pre&gt; statement.  It is a little more involved that that, one issue was that the duel-level launch configuration that Eclipse uses does not always do a great job of detecting Sun VMs, of which the &lt;pre&gt;--launcher.XXMaxPermSize&lt;/pre&gt; only works with a Sun VM, which defaults the PermGen space to a size of 64MB.  &lt;br /&gt;&lt;br /&gt;The suggested fix is to remove &lt;pre&gt;--launcher.XXMaxPermSize&lt;/pre&gt; and replace it with &lt;pre&gt;-XX:MaxPermSize=256m&lt;/pre&gt; after &lt;pre&gt;-vmargs&lt;/pre&gt; it should now pickup the change.&lt;br /&gt;&lt;br /&gt;This change and usage of &lt;pre&gt;-XX:MaxPermSize&lt;/pre&gt; is said to be universal (to some degree) to other VM's such as the mac.&lt;br /&gt;&lt;br /&gt;An example of my config which works, which is "fairly" close to the original eclipse.ini:&lt;br /&gt;&lt;pre style="width: 350px; background-color: #ffffcc; border: 3px inset blue; padding: 6px;"&gt;-showsplash org.eclipse.platform&lt;br /&gt;-vmargs&lt;br /&gt;-Xms512M&lt;br /&gt;-Xmx1028M&lt;br /&gt;-XX:MaxPermSize=256M&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;One area of great disappointment with all of this, is that it appears like they were spending a fair amount of time arguing how and when to apply this fix or even announce this potential problem instead of just getting it done.  I really do enjoy the Eclipse experience, but because of this problem, I was about to drop it and probably never give it another chance.  Good thing I went snooping through their Bugzilla!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;&lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=203325"&gt;Eclipse's Bugzilla Entry on this bug&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-1089085833054623516?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/1089085833054623516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=1089085833054623516' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/1089085833054623516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/1089085833054623516'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2008/01/eclipse-v33x-permgen-memory-errors.html' title='Eclipse v3.3.x PermGen Memory Errors'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-1833043253822917895</id><published>2008-01-01T17:15:00.000-05:00</published><updated>2008-01-01T17:26:56.559-05:00</updated><title type='text'>FireFox Add-On worth trying - FireBug</title><content type='html'>For the last few months I have been wishing that the PC version of Safari had the same full robust HTML and CSS debugging tools as the mac counterpart.  Well, I have just found in the last week a tool that should make any Mac Safari user quite envious.&lt;br /&gt;&lt;br /&gt;The tool's name is FireBug. &lt;br /&gt;&lt;br /&gt;What is great about it?  Here is a very short list:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;JavaScript Error Console&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;JavaScript profiler&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;View source code for HTML, CSS, JavaScript, Images, etc...&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;HTML Source hover-highlighting&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Select an DOM element, and it can show the CSS styles that contribute to it, the Box model layout, and DOM hooks&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Dynamically modify CSS elements without modifying any source code or reloading the page to see the results&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Set JavaScript breakpoints for debugging&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;See Network performance stats on object/page loads&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Review dynamic AJax calls: parms, headers, and response&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;This is a really useful tool.  If you spend any time in HTML, JavaScript, CSS, this tool is well worth looking in to.  I don't think many would be disappointed.  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.getfirebug.com/"&gt;FireBug's Website&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-1833043253822917895?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/1833043253822917895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=1833043253822917895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/1833043253822917895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/1833043253822917895'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2008/01/firefox-add-on-worth-trying-firebug.html' title='FireFox Add-On worth trying - FireBug'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-6871988952291746865</id><published>2008-01-01T16:44:00.000-05:00</published><updated>2008-01-02T22:27:53.421-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='AJax'/><category scheme='http://www.blogger.com/atom/ns#' term='Prototype'/><title type='text'>Prototype v1.6  Ajax.Updater and textarea in FireFox v2.x</title><content type='html'>There is a slight issue with how Prototype v1.6 (and prior) deals with textarea form elements when used in combination with Ajax.Updater.  This appears to only be an issue with FireFox v2.0.0.x and not IE7 or Safari v3 for Windows.  I have not tested to confirm if this is an issue on non-windows versions of FireFox or other browsers or platforms.&lt;br /&gt;&lt;br /&gt;The problem enters when Updater is successful in putting the results content in to the textarea innerHTML, but the contents are not displayed.  Most of the solutions that I have been able to find on the web suggests to use a onSuccess: callback then within there, pull the responseText from the response object and shove it in to the value of the textarea.  &lt;br /&gt;&lt;br /&gt;Example of a BAD use of Ajax.Updater with the textarea:&lt;br /&gt;&lt;pre style="background-color: #fbf6ee;"&gt;&lt;br /&gt;  &amp;lt;form id="formid"&amp;gt;&lt;br /&gt;    &amp;lt;textarea id="textareaid" /&amp;gt;&lt;br /&gt;  &amp;lt;/form&amp;gt;&lt;br /&gt;  Ajax Status: &amp;lt;div id="ajaxStatus"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;...&lt;br /&gt;  new Ajax.Updater( 'textareaid', 'anSOAapp.jsp', {&lt;br /&gt;      parameters: { id: anId, afield : avar },&lt;br /&gt;      onFailure: function(){&lt;br /&gt;          $('ajaxStatus').update('&lt;b&gt;An error occurred.&lt;/b&gt;'); &lt;br /&gt;      }, &lt;br /&gt;      onSuccess: function(response) {&lt;br /&gt;           $('textareaid').value = response.responseText;&lt;br /&gt;           $('ajaxStatus').update( response.status ); &lt;br /&gt;   }});&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;How wasteful!  Not only in redundant processing (the contents of the textarea is being updated twice!), but also in memory that JavaScript is now having to allocate and use.  What is the point of using the Ajax.Updater function if you are just going to overwrite its output?!  For small tidbits of data, it may not be noticeable, but for larger data sets, then you can not only risk the out of memory exceptions, but also a non-functional page.&lt;br /&gt;&lt;br /&gt;The whole point of utilizing the Ajax.Updater function is to help streamline the whole data flow and to offset the needs to keeping the data in a variable or as a String in JavaScript, which is what occurs when using the responseText field.  &lt;br /&gt;&lt;br /&gt;There is an easy solution that helps to avoid these problems of redundancy and excessive memory utilization.  It is actually quite simple.&lt;br /&gt;&lt;br /&gt;Example of the correct use of Ajax.Updater with the textarea:&lt;br /&gt;&lt;pre style="background-color: #fbf6ee;"&gt;&lt;br /&gt;  &amp;lt;form id="formid"&amp;gt;&lt;br /&gt;    &amp;lt;textarea id="textareaid" /&amp;gt;&lt;br /&gt;  &amp;lt;/form&amp;gt;&lt;br /&gt;  Ajax Status: &amp;lt;div id="ajaxStatus"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;...&lt;br /&gt;  new Ajax.Updater( 'textareaid', 'anSOAapp.jsp', {&lt;br /&gt;      parameters: { id: anId, afield : avar },&lt;br /&gt;      onFailure: function(){&lt;br /&gt;          $('ajaxStatus').update('&lt;b&gt;An error occurred.&lt;/b&gt;'); &lt;br /&gt;      }, &lt;br /&gt;      onSuccess: function(response) {&lt;br /&gt;           if ( Prototype.Browser.Gecko ) {&lt;br /&gt;              &lt;b&gt;$('formid').reset();&lt;/b&gt;&lt;br /&gt;           }&lt;br /&gt;           $('ajaxStatus').update( response.status ); &lt;br /&gt;   }});&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Notice that the key element was &lt;b&gt;&lt;pre&gt;$('formid').reset();&lt;/pre&gt;&lt;/b&gt; inside a conditional to ensure it only is performed for FireFox browsers.&lt;br /&gt;&lt;br /&gt;Give it a try.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Resources&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.prototypejs.org/api"&gt;Prototype API Docs&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.prototypejs.org/api/form#method-reset"&gt;Prototype's Form.reset() function API Docs&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-6871988952291746865?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/6871988952291746865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=6871988952291746865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/6871988952291746865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/6871988952291746865'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2008/01/prototype-v16-ajaxupdater-and-textarea.html' title='Prototype v1.6  Ajax.Updater and textarea in FireFox v2.x'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-3029986126935053323</id><published>2007-12-11T02:45:00.000-05:00</published><updated>2007-12-11T02:54:42.745-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Lead'/><title type='text'>Lead in Children's Toys and Books</title><content type='html'>Sad.  It is really sad the extend to which manufacturers are willing to put our children's health and lives in jeopardy to just make a profit.  &lt;br /&gt;&lt;br /&gt;The current batch of recalls tend to be related to paint that has high amounts of lead, which brings me to wonder what about the children's books and ink?  How much lead are in those?  Is anyone even testing children's books?&lt;br /&gt;&lt;br /&gt;Here is a site that is trying to list toys that have been independently tested to be free from surface lead and embedded lead.  Unfortunately they do warn that even though these toys tested OK, that does not necessarily mean other batches of the same product (future or past) will not contain lead.&lt;br /&gt;http://www.toyportfolio.com/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-3029986126935053323?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/3029986126935053323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=3029986126935053323' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/3029986126935053323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/3029986126935053323'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2007/12/lead-in-childrens-toys-and-books.html' title='Lead in Children&apos;s Toys and Books'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-1023775690452132156</id><published>2007-12-11T02:40:00.000-05:00</published><updated>2007-12-11T02:45:12.482-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Lead'/><title type='text'>Get the Lead Out - Reply</title><content type='html'>I came across the following post:&lt;br /&gt;http://atatude.wordpress.com/2007/12/10/get-the-lead-out/&lt;br /&gt;&lt;br /&gt;It had a reference to the following CNN article on Lead in Christmas Lights:&lt;br /&gt;http://www.cnn.com/2007/HEALTH/12/10/christmas.lights/&lt;br /&gt;&lt;br /&gt;My reply:&lt;br /&gt;&lt;br /&gt;Nice find on the CNN article!&lt;br /&gt;&lt;br /&gt;Who do they think we are?  A bunch of mindless idiots who will blindly buy their products irrespective to the toxins they are willing to dump in to them so they can make a bigger buck?  Sure sounds like it from some of the responses given by Wal-mart and other companies that were interviewed.&lt;br /&gt;&lt;br /&gt;I think the only way these arrogant companies will learn is through the bottom line.  When parents stop spending "their" money on these tainted products and even return the products that have been recalled, their profits will suffer. Please do not just throw away recalled products, but try to return them.  There is no better way to make the irresponsible retailers and manufacturers realize what the true impact of their "mistakes" will cost them.&lt;br /&gt;&lt;br /&gt;If surface lead can come off with a wipe test, just imagine how much lead comes off upon contact with the tree or other decorations?  How much of that lead is microscopic to the point it is easily airborne too?  How much lead are they putting in the artificial trees?  How safe are the non-electrical ornaments?  Since lipstick and children's toys has been found to have high levels of lead, what can we trust? &lt;br /&gt;&lt;br /&gt;One point that should be made about blood tests for lead, is that the body completely absorbs all lead within about 30 days of exposure so blood lead tests can only check for recent exposures and is no good at prior exposures.  Once the lead is absorbed in to the tissue, I don't think even detoxification treatments can remove it.&lt;br /&gt;&lt;br /&gt;Last year I found some extension cords that were rated for indoor and outdoor use that had a label that specified that they were lead-free.  Lead-free products can be made if the manufacturers want to.  Personally, I'd be more than happy to pay a 20% or even 40% premium if the product can be guaranteed to be lead-free.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-1023775690452132156?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/1023775690452132156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=1023775690452132156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/1023775690452132156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/1023775690452132156'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2007/12/get-lead-out-reply.html' title='Get the Lead Out - Reply'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-4586474083872285848</id><published>2007-09-05T11:33:00.000-05:00</published><updated>2007-09-05T11:34:58.184-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>PermGen Exception</title><content type='html'>Here are a few good links that discuss this in more detail. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://xlml.com/aehso/2007/04/05/the-dreaded-javalangoutofmemoryerror-permgen-space-exception/"&gt;The dreaded “java.lang.OutOfMemoryError: PermGen space” exception.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java"&gt;Classloader leaks: the dreaded "java.lang.OutOfMemoryError: PermGen space" exception&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.sun.com/fkieviet/entry/how_to_fix_the_dreaded"&gt;How to fix the dreaded "java.lang.OutOfMemoryError: PermGen space" exception (classloader leaks)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-4586474083872285848?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/4586474083872285848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=4586474083872285848' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/4586474083872285848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/4586474083872285848'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2007/09/permgen-exception.html' title='PermGen Exception'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-5417035864892612296</id><published>2007-08-30T21:49:00.000-05:00</published><updated>2007-08-30T21:59:11.533-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Healthcare'/><category scheme='http://www.blogger.com/atom/ns#' term='Coffee'/><title type='text'>Go for the Bitter Coffee</title><content type='html'>Just wanted to share something interesting about how healthly a bitter cup of coffee may actually be.  It turns out the higher the bitter content, the greater the amount of anti-oxidants.  It appears that the bitterness is caused by the roast, so the darker the roast, the more anti-oxidants it may contain.&lt;br /&gt;&lt;br /&gt;Check out the original story at &lt;a href="http://www.highlighthealth.com/food-and-nutrition/bitter-coffee-better-health/trackback/"&gt;Bitter Coffee Better Health&lt;/a&gt; with references back to the original studies (just in case this sounds too good to be true and you want to read it yourself ;-) ).&lt;br /&gt;&lt;br /&gt;Also, as a note, there are many other interesting articles of note, all with a good dose of references too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-5417035864892612296?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/5417035864892612296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=5417035864892612296' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/5417035864892612296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/5417035864892612296'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2007/08/go-for-bitter-coffee.html' title='Go for the Bitter Coffee'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-945085113842994059</id><published>2007-07-19T11:19:00.000-05:00</published><updated>2007-07-19T11:53:45.256-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='AJax'/><category scheme='http://www.blogger.com/atom/ns#' term='Safari'/><title type='text'>Status of Safari and some comments about JavaScript and AJax</title><content type='html'>Sorry to say, but I have not been working with Safari for a while now.  I did get a few comments pointing out some flaws in what I have done in the past.  I am not too surprised, but luckily that is one of the best ways to learn and grow.  I'll be activating those comments shortly.&lt;br /&gt;&lt;br /&gt;As some background, I have tended to keep away from JavaScript in the past.  The same holds true today, but at a lesser degree.  The primary reason was cross browser compatibility and the fact that sometimes the JavaScript can get quite complex when you start to include all of the variations for past browsers and future ones.&lt;br /&gt;&lt;br /&gt;One thing that has been winning me over is the JavaScript tools that are focused on prototype.js and the use of AJax.  It also helps that the advanced features in CSS 2.0 and what will be coming with CSS 3.0 specifications will help reduce the need for scripting.&lt;br /&gt;&lt;br /&gt;I have continuously been on the hunt for a good JavaScript based code set that allows table scrolling.  I found a bunch of bad stuff out there.  I found a few good ones too.  One of which actually does work with AJax.  I am wanting to post reviews and links to these tools for they are hard to find, and I think the information will be beneficial.  The tool that works with AJax utilizes prototype.js which is great, but I have some enhancements that I am working on that will be increasing the performance by about a factor of 10 or greater (I think.  Need to benchmark.) when dealing with rowsets greater than 1000 when the will be needing to deal with 40,000+, probably up to 100,000 rows... I know... I don't write the specs, just follow them :-(&lt;br /&gt;&lt;br /&gt;For now I'll provide some links...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;References:&lt;/span&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;  http://www.sergiopereira.com/articles/prototype.js.html&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;Excellent independent documentation on prototype.js!&lt;/li&gt;&lt;li&gt;Using version 1.5.1&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  http://www.tetlaw.id.au/view/blog/table-sorting-with-prototype/&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;    Excellent!  Uses prototype.js and the code is very clean and readable.&lt;/li&gt;&lt;li&gt;Works with AJax&lt;/li&gt;&lt;li&gt;Sluggish with 1000+ rows.  I have some fixes in the pipeline that once I get them tested I'll see about getting the code changes adopted.&lt;/li&gt;&lt;li&gt;Using version 1.0 with Prototype version 1.5.1 instead of 1.5.0_r&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;http://www.litotes.demon.co.uk/example_scripts/tableScroll.html&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Works great with IE5, IE6, IE7, FireFox v2 (Windows and Mac OSx), and Safari&lt;/li&gt;&lt;li&gt;Low impact.  Just call the function with passing the ID for your table and it does the rest.&lt;/li&gt;&lt;li&gt;Problem? It does not work with AJax.  Works great with static HTML tables.  Honestly, the code is a bit cluttered since it does not utilize prototype.js so it has to handle so much more internally.&lt;/li&gt;&lt;li&gt;Another problem appears to be that it was last updated in 2004.  &lt;/li&gt;&lt;li&gt;Sad, it has strong potential if it was not for the lack of AJax support.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-945085113842994059?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/945085113842994059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=945085113842994059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/945085113842994059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/945085113842994059'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2007/07/status-of-safari-and-some-comments.html' title='Status of Safari and some comments about JavaScript and AJax'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-3889769782092922969</id><published>2007-03-01T12:35:00.000-05:00</published><updated>2007-03-01T12:49:43.238-05:00</updated><title type='text'>Pet Peeve with Technical Help on the Internet</title><content type='html'>&lt;p class="MsoNormal"&gt;I guess I am just in a complaining mood, but one pet peeve I have with technical help on the internet is the lack of documenting some the basics.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;          &lt;p class="MsoNormal"&gt;These basics include:&lt;br /&gt;&lt;/p&gt;    &lt;ul&gt;&lt;li&gt;&lt;span style=""&gt; &lt;/span&gt;timestamp of posting&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt; &lt;/span&gt;technologies involved&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt; &lt;/span&gt;versions of all technologies&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt; &lt;/span&gt;clear descriptions on how to repeat the problem or the solution&lt;/li&gt;&lt;li&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;span style=""&gt; &lt;/span&gt;posting the solution if it is found&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt; &lt;/span&gt;citing references for solutions or other concepts&lt;/li&gt;&lt;/ul&gt;    &lt;p class="MsoNormal"&gt;It is amazing how many websites have obsolete and dated information on them.&lt;span style=""&gt;  &lt;/span&gt;At least blogs and message threads do timestamp their content, but when someone creates a website with general information, it is difficult to judge how old the content is.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I guess I could also complain about titles of documents and messages in that many people like to use very generic descriptions such “I have a problem” or “I need a solution fast”.&lt;span style=""&gt;  &lt;/span&gt;I feel titles should contain the most basic essence of the content of the document.&lt;span style=""&gt;  &lt;/span&gt;In light of technical help, when you are presented with a list of thousands of titles, it does make it easier to search through them if they were more logically created.&lt;span style=""&gt;  &lt;/span&gt;Yes, and I feel the same way about email in general.&lt;span style=""&gt;  &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;To summarize: Please give careful consideration to what you choose for titles and the content of postings.&lt;span style=""&gt;  &lt;/span&gt;It may make for better searches.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-3889769782092922969?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/3889769782092922969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=3889769782092922969' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/3889769782092922969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/3889769782092922969'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2007/03/pet-peeve-with-technical-help-on.html' title='Pet Peeve with Technical Help on the Internet'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-704032343000328538</id><published>2007-02-27T14:15:00.000-05:00</published><updated>2007-02-27T15:43:34.201-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JNLP'/><category scheme='http://www.blogger.com/atom/ns#' term='Java Web Start'/><title type='text'>Java Web Start – JNLP Tuning</title><content type='html'>&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=""&gt;My relevant environment background is as follows:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=""&gt;&lt;span style=""&gt;   &lt;/span&gt;Eclipse v3.2.1&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt;&lt;span style=""&gt;   &lt;/span&gt;JDK 1.5.0_10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;        &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;JNLP Tuning:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;------------&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;It is possible to tune the JNLP files to improve performance in the loading of the jar files.&lt;span style=""&gt;  &lt;/span&gt;For example, you can specify which jars are needed and which ones are optional.&lt;span style=""&gt;  &lt;/span&gt;The point being that the application may not need to download all of the jars to get up and running.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;There are two major components that I will list here.&lt;span style=""&gt;  &lt;/span&gt;One is to specify which jar files need to be aggressively loaded versus ones that can be lazily loaded. The other technique is to list all of the contained packages in the related jar files so Java Web Start does not have to download all Jars just to find a class file or resource.&lt;span style=""&gt;  &lt;/span&gt;The later will make for larger JNLP files and of course make them more complex, but could improve the initial download time for users to get up and running.&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;Both of these techniques should actually be combined to provide the greatest performance gains.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;        &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;Regardless as to what techniques are used to improve the initial loading time of the jar files, once they are in the Java Web Start cache, the load time will be measured in seconds instead of minutes for subsequent launches of the application.&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="font-weight: bold;font-family:courier new;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:10;"&gt;Example of lazy and eager loading&lt;br /&gt;---------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;A download hint of lazy or eager can be specified.&lt;span style=""&gt;  &lt;/span&gt;Java Web Start will try to honor these hints, but if it cannot find a needed resource it may download all jars anyway until it finds what it is looking for.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style=""&gt;  &lt;/p&gt;      &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size:100%;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;        &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&amp;lt;resources&amp;gt;&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;  &amp;lt;jar href="plugins/mysql_connector_j_3.1.12.jar" download="eager" /&amp;gt;&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:10;"&gt;&amp;lt;jar href="plugins/org.apache.log4j_1.2.14.jar" download="lazy" /&amp;gt;&lt;br /&gt;&lt;span style=""&gt;    &lt;/span&gt;&amp;lt;/resources&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;span style="font-weight: bold;font-family:courier new;font-size:130%;"  &gt;Example of Package and Part:&lt;br /&gt;----------------------------&lt;/span&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;You can provide a hint to JWS as to what is contained within a jar by the use of the Package and Part within the JNLP.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;Building upon the example under lazy and eager loading:&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&amp;lt;resources&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10;"&gt;  &lt;/span&gt;&lt;span style="font-size:10;"&gt; &amp;lt;jar href="plugins/mysql_connector_j_3.1.12.jar" download="eager" part="mysqlcj" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10;"&gt;  &lt;/span&gt;&lt;span style="font-size:10;"&gt; &amp;lt;jar href="plugins/org.apache.log4j_1.2.14.jar" download="lazy" part="log4j" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:10;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10;"&gt;  &lt;/span&gt;&lt;span style="font-size:10;"&gt; &amp;lt;package part="mysqlcj" name="com.mysqlj.*" recursive="true" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10;"&gt;  &lt;/span&gt;&lt;span style="font-size:10;"&gt; &amp;lt;package part="log4j" name="org.apache.log4j.*" recursive="true" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&amp;lt;/resources&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;span style="font-weight: bold;"&gt;Part&lt;/span&gt; ties the &lt;span style="font-weight: bold;"&gt;package&lt;/span&gt; tags back to the jar tags.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;The use of the recursive="true" attribute really can save a great deal of typing. Take for example the mySQL connector j example right above.&lt;span style=""&gt;  &lt;/span&gt;It used a value of true on the recursive attribute, but if it were to use false, you would have to list out all of the possible packages contained in the jar even though they all began with com.mysql.&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;                    &lt;p class="MsoNormal" style=""&gt;  &lt;/p&gt;&lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&amp;lt;package part="mysqlcj" name="com.mysqlj.jdbc.*" recursive="false" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&amp;lt;package part="mysqlcj" name="com.mysqlj.jdbc.configs.*" recursive="false" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&amp;lt;package part="mysqlcj" name="com.mysqlj.jdbc.integration.c3p0.*" recursive="false" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&amp;lt;package part="mysqlcj" name="com.mysqlj.jdbc.integration.jboss.*" recursive="false" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&amp;lt;package part="mysqlcj" name="com.mysqlj.jdbc.jdbc2.optional.*" recursive="false" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&amp;lt;package part="mysqlcj" name="com.mysqlj.jdbc.log.*" recursive="false" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&amp;lt;package part="mysqlcj" name="com.mysqlj.jdbc.profiler.*" recursive="false" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:courier new;"&gt;&lt;span style="font-size:10;"&gt;&lt;span style=""&gt;      &lt;/span&gt;&amp;lt;package part="mysqlcj" name="com.mysqlj.jdbc.util.*" recursive="false" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;        &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;References:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;-----------&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;http://lopica.sourceforge.net/ref.html#package&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;http://lopica.sourceforge.net/ref.html#jar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-704032343000328538?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/704032343000328538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=704032343000328538' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/704032343000328538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/704032343000328538'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2007/02/java-web-start-jnlp-tuning.html' title='Java Web Start – JNLP Tuning'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-8722787512324118874</id><published>2007-02-27T13:16:00.000-05:00</published><updated>2007-02-27T16:56:11.538-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Web Start'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse Plugin'/><title type='text'>Java Web Start and Eclipse – Feature Export and an Eclipse Bug</title><content type='html'>&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;My relevant environment background is as follows:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;&lt;span style=""&gt;   &lt;/span&gt;Eclipse v3.2.1&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;&lt;span style=""&gt;   &lt;/span&gt;JDK 1.5.0_10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;    &lt;p class="MsoNormal" style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;Eclipse 3.2 Bug with Exporting a Feature to Java Web Start&lt;br /&gt;----------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;There is a known bug in Eclipse version 3 that generates the wrong name for an Eclipse plugin when exporting a Deployable Feature.&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;The bug is marked as fixed and has also been marked as being incorporated in the main stream releases of various versions of Eclipse, such as v3.2.1.&lt;span style=""&gt;  &lt;/span&gt;But the bug still remains.&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;The symptoms of this bug is the following stack dump when attempted to run under Java Web Start:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;                                            &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;&lt;span style=""&gt;  &lt;/span&gt;!SESSION Tue Feb 06 10:48:01 EST 2007 ------------------------------------------&lt;br /&gt;&lt;span style=""&gt;  &lt;/span&gt;!ENTRY org.eclipse.core.launcher 4 0 2007-02-06 10:48:01.112&lt;br /&gt;&lt;span style=""&gt;  &lt;/span&gt;!MESSAGE Exception launching the Eclipse Platform:&lt;br /&gt;&lt;span style=""&gt;  &lt;/span&gt;!STACK&lt;br /&gt;&lt;span style=""&gt;  &lt;/span&gt;java.lang.NullPointerException&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at java.util.Hashtable.put(Unknown Source)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at org.eclipse.core.launcher.WebStartMain.basicRun(WebStartMain.java:58)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at org.eclipse.core.launcher.Main.run(Main.java:977)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at org.eclipse.core.launcher.WebStartMain.main(WebStartMain.java:40)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at java.lang.reflect.Method.invoke(Unknown Source)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at com.sun.javaws.Launcher.executeApplication(Unknown Source)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at com.sun.javaws.Launcher.executeMainClass(Unknown Source)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at com.sun.javaws.Launcher.continueLaunch(Unknown Source)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at com.sun.javaws.Launcher.run(Unknown Source)&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;at java.lang.Thread.run(Unknown Source)&lt;br /&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;The cause is that Eclipse is generating the plugin with a name of &lt;span style="font-weight: bold;"&gt;org.eclipse.osgi_3.2.2.R32x_v20061101.jar&lt;/span&gt; when it really should be &lt;span style="font-weight: bold;"&gt;org.eclipse.osgi_3.2.2-v20061101.jar&lt;/span&gt;.&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;Depending upon your version of Eclipse, you may have different versions of this jar file.&lt;span style=""&gt;  &lt;/span&gt;All that is needed to be done is to remove the .R32x_ and replace it with -. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;You must also modify the generated JNLP file to reflect the new name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;This will occur each time you perform an export of a Deployable Feature.&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;The reason why this is an issue, is that internally to the plugin, (or other plugins that are trying to find this one), it is using a different name/signature that does not match the use of .R32X_ . &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"  style="font-weight: bold;font-family:courier new;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:10;"&gt;References:&lt;br /&gt;-----------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;https://bugs.eclipse.org/bugs/show_bug.cgi?id=125867&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;http://eclipsezone.com/eclipse/forums/t64274.html&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-8722787512324118874?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/8722787512324118874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=8722787512324118874' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/8722787512324118874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/8722787512324118874'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2007/02/java-web-start-and-eclipse-feature.html' title='Java Web Start and Eclipse – Feature Export and an Eclipse Bug'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-9041248893348176630</id><published>2007-02-27T12:54:00.000-05:00</published><updated>2007-02-27T13:04:04.135-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Web Start'/><category scheme='http://www.blogger.com/atom/ns#' term='Hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse Plugin'/><title type='text'>Java Web Start and Eclipse - Signing Jars and Hibernate</title><content type='html'>&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=""&gt;As a quick note:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;If you are deploying an Eclipse Plugin as a Java Web Start, there are some changes that must be made to your application to ensure it plays well with everything. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;This is the first of a few quick notes on the subject.&lt;span style=""&gt;  &lt;/span&gt;I am starting with this issue, since it was the most difficult to find a resolution for.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;          &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;My environment background is as follows:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=""&gt;  Eclipse v3.2.1&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt;  hibernate plugin : com.hibernate.eclipse_3.2.0.beta9a&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt;  JDK 1.5.0_10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;Java Web Start is basically a tool that Sun provides that allows users to run Java applications that have been bundled in Jars on their computers.&lt;span style=""&gt;  &lt;/span&gt;It has limitations similar to those imposed upon Java Applets, but if the jars are signed, then the Java Security Manager can grant full access to all resources on the local computer.&lt;span style=""&gt;  &lt;/span&gt;It may take a while to download numerous signed jars and verify their signatures, but once they are downloaded, rerunning the application the start time can be measured in a matter of seconds instead of minutes.&lt;span style=""&gt;  &lt;/span&gt;JWS also provides nice features for updates and utilization of different JDK versions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="font-weight: bold;"&gt;&lt;span style=""&gt;&lt;span style="font-weight: bold;"&gt;Jar Files MUST be Signed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:courier new;"&gt;------------------------&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="font-weight: bold;"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;All jar files that are being deployed must be signed if your application must access resources outside of the sandbox.&lt;span style=""&gt;  &lt;/span&gt;If a jar file is to be expanded on the client's computer, all nested jars must also be signed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;Java, at least 1.5 and lower, cannot deal with nested jar files.&lt;span style=""&gt;  &lt;/span&gt;When such a situation occurs, as with the Hibernate plugin for Eclipse, Xerces, or even the Eclipse core plugin for example, the jar file must be expanded before the resources can be accessed.&lt;span style=""&gt;  &lt;/span&gt;When the contents of a jar file is expanded, the resources it contains is no longer digitally signed (if it was decompressed, it will not match the digital signature).&lt;span style=""&gt;  &lt;/span&gt;This is an issue for the nested jars, since they generally must be signed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;The only exception to this rule is with the Eclipse Hibernate plugin.&lt;span style=""&gt;  &lt;/span&gt;The two jar files that cannot be signed are: hibernate3.jar and cglib-2.1.3.jar.&lt;span style=""&gt;  &lt;/span&gt;If these two jars are signed, the following exception will result:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;java.lang.SecurityException: class "com.mypackage.MyClass$$EnhancerByCGLIB$$a1a0f853"'s &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;         &lt;/span&gt;signer information does not match signer information of other classes in the same package&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;The key part of the above error message being "signer information does not match signer information of other classes in the same package".&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;span style="font-weight: bold;"&gt;A side note:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:courier new;"&gt;------------&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;I am unable to find the reference that states all nested jars must be signed (it is also a low priority to find it).&lt;span style=""&gt;  &lt;/span&gt;Signing nested jars files works with the exception above.&lt;span style=""&gt;  &lt;/span&gt;Upon searching for the problem as listed with the ‘signer information does not match’ exception, I have found that many other people have also signed the nested jars before exporting the plugins out of Eclipse.&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;To me this just sounds wrong on a few levels.&lt;span style=""&gt;  &lt;/span&gt;I have not had the chance to really test this theory by unsigning these plugins, but it will solve that question.&lt;span style=""&gt;  &lt;/span&gt;If it does work without signing the nested jars, then it does make sense that when JWS initially expands the jars, it keeps track of the original signature and that all expanded resources has having passed the verification.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;If you have references that point to the fact that nested jars do not need to be signed, please let me know.&lt;span style=""&gt;  &lt;/span&gt;I will probably run some tests in the next week or two to verify this.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;span style="font-weight: bold;"&gt;References:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:courier new;"&gt;-----------&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;http://groups.google.co.za/group/CTJUG-Forum/tree/browse_frm/month/2006-05?_done=%2Fgroup%2FCTJUG-Forum%2Fbrowse_frm%2Fmonth%2F2006-05%3F&amp;amp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;States that "Never sign hibernate???.jar and cglib???.jar. They seem to work just fine as they are."&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/development.html#security&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/contents.html"&gt;http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/contents.html&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-9041248893348176630?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/9041248893348176630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=9041248893348176630' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/9041248893348176630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/9041248893348176630'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2007/02/java-web-start-and-eclipse-signing-jars.html' title='Java Web Start and Eclipse - Signing Jars and Hibernate'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-6310703482171136705</id><published>2006-12-07T15:04:00.000-05:00</published><updated>2006-12-07T15:09:06.794-05:00</updated><title type='text'>Lead and Christmas Lights</title><content type='html'>Lead is a highly toxic poison.  There are no safe levels of exposure for children for it causes irreversible brain damage.&lt;br /&gt;&lt;br /&gt;Lead should be outlawed in consumer products.  Period.&lt;br /&gt;&lt;br /&gt;Let technology find an alternative substitute.&lt;br /&gt;&lt;br /&gt;Some Links:&lt;br /&gt;http://jfaughnan.blogspot.com/2006/11/lead-poisoning-from-christmas-lights.html&lt;br /&gt;&lt;pre&gt;&lt;a href="http://checnet.greenhome.com/products/kids/art_supplies/107864/" target="_blank"&gt;http://checnet.greenhome.com/products/kids/art_supplies/107864/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://answers.google.com/answers/threadview?id=435871" target="_blank"&gt;http://answers.google.com/answers/threadview?id=435871&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.babycenter.com/comments/toddler/toddlersafety/10453" target="_blank"&gt;http://www.babycenter.com/comments/toddler/toddlersafety/10453&lt;/a&gt;&lt;br /&gt;&lt;a href="http://news.thomasnet.com/fullstory/469079/3839" target="_blank"&gt;http://news.thomasnet.com/fullstory/469079/3839&lt;/a&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-6310703482171136705?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://jfaughnan.blogspot.com/2006/11/lead-poisoning-from-christmas-lights.html' title='Lead and Christmas Lights'/><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/6310703482171136705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=6310703482171136705' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/6310703482171136705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/6310703482171136705'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/12/lead-and-christmas-lights.html' title='Lead and Christmas Lights'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-116008630977484790</id><published>2006-10-05T17:04:00.000-05:00</published><updated>2006-10-05T17:29:34.246-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='W3C Standards'/><category scheme='http://www.blogger.com/atom/ns#' term='Safari'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Links'/><title type='text'>Useful Links for Web Development on Safari</title><content type='html'>Below are some useful links for doing web development for Safari.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Links for Limited Safari Technical Documentation&lt;/b&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/internet/safari/safari_css.html"&gt;http://developer.apple.com/internet/safari/safari_css.html - This is a good quick reference.  Do not assume this list is the complete listing, for it is not.  It dates back to around 2004 and has not been updated.  To get the full supported list try the following link.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/doc/uid/TP30001266-SW1"&gt;http://developer.apple.com/documentation/AppleApplications/ Reference/SafariCSSRef/Articles/StandardCSSProperties.html# //apple_ref/doc/uid/TP30001266-SW1 - This is the full supported listing of all CSS properties.  Not sure when this was published, but it is more recent than the above link.  There is also the CSS Extensions that are included in Safari: see the next link.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/documentation/AppleApplications/Reference/SafariCSSRef/Articles/CSSExtensions.html#//apple_ref/doc/uid/TP30001265-SW1"&gt;http://developer.apple.com/documentation/AppleApplications/ Reference/SafariCSSRef/Articles/CSSExtensions.html# //apple_ref/doc/uid/TP30001265-SW1 - These are the CSS Extensions.  All two of them! ;-)  Try clicking on the link “show TOC” for more information from Apple.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Miscellaneous Links&lt;/b&gt;&lt;br /&gt;&lt;a href="http://builder.com.com/5100-6371-1050180.html#Listing%20F"&gt;http://builder.com.com/5100-6371-1050180.html#Listing%20F - An alternative solution to dealing with different media types. Using the @media in your style sheets.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.mozilla.org/en/docs/Images%2C_Tables%2C_and_Mysterious_Gaps"&gt;http://developer.mozilla.org/en/docs/Images%2C_Tables%2C_and_Mysterious_Gaps - Gaps around images&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Links from Apple&lt;/b&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/internet/safari/index.html"&gt;http://developer.apple.com/internet/safari/index.html - Apple’s Developer Domain’s Safari support page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/internet/safari/safari_css.html"&gt;http://developer.apple.com/internet/safari/safari_css.html - CCS reference for Safari.  Out of date, but useful for those elements that are on the list.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/internet/safari/uamatrix.html"&gt;http://developer.apple.com/internet/safari/uamatrix.html - Mac OS, Safari, and WebKit version matrix.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;NOTE:  WebKit is also the engine that drives not only Safari, but also the Mac’s Dashboard, Mail, and many other applications.  This website may contain all of the updated documentation that I have been looking for.  Actually not, it is mostly driven to developmental focus of the WebKit itself.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"&gt;http://www.ecma-international.org/publications/standards/Ecma-262.htm - The JavaScript standard that Safari (WebKit) is based upon.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CSS Related Links&lt;/b&gt;&lt;br /&gt;&lt;a href="http://meyerweb.com/eric/css/edge/"&gt;http://meyerweb.com/eric/css/edge/ - CSS Edge&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.quirksmode.org/viewport/compatibility.html"&gt;http://www.quirksmode.org/viewport/compatibility.html - Screen dimensions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.quirksmode.org/dom/innerhtml.html"&gt;http://www.quirksmode.org/dom/innerhtml.html - Benchmark - w3c DOM vs. innerHTML&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;JavaScript Related Links&lt;/b&gt;&lt;br /&gt;&lt;a href="http://webkit.opendarwin.org/blog/"&gt;http://webkit.opendarwin.org/blog/ - Has some information on JavaScript.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.alexking.org/blog/2004/03/01/mac-browser-javascript-performance/"&gt;http://www.alexking.org/blog/2004/03/01/mac-browser-javascript-performance/ - Has comments about browser performance. John Strung comments that turning off all languages other than English (or One) "can significantly speed up Safari". He is ASKING if anyone has tried this, so mark this down as RUMOR.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.codehouse.com/javascript/tips/random_letter/"&gt;http://www.codehouse.com/javascript/tips/random_letter/ - Creating random characters&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.quirksmode.org/css/overflow.html"&gt;http://www.quirksmode.org/css/overflow.html&lt;/a&gt; &lt;br /&gt;   Quirksmode CCS - Contains some interesting aspects to CSS&lt;br /&gt;   Quirksmode CCS - Not For N4 CCS &lt;br /&gt;   Quirksmode CCS - Tables CCS &lt;br /&gt;   Quirksmode CCS - JavaScript&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.javascriptkit.com/jsref/regexp.shtml"&gt;http://www.javascriptkit.com/jsref/regexp.shtml - JavaScript Reference&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Table Related Links&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#edef-TD"&gt;http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#edef-TD - Information on how percents are only a hint&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.5"&gt;http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.5 - Table information&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.quirksmode.org/viewport/compatibility.html"&gt;http://www.quirksmode.org/viewport/compatibility.html - Idea for adjusting width was found here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.workingwith.me.uk/articles/scripting/standardista_table_sorting"&gt;http://www.workingwith.me.uk/articles/scripting/standardista_table_sorting - Table sorting &lt;/a&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/project/showfiles.php?group_id=162528"&gt;http://sourceforge.net/project/showfiles.php?group_id=162528 - Download for STS&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;HTML Links&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.w3.org/TR/1999/REC-html401-19991224/cover.html#minitoc"&gt;http://www.w3.org/TR/1999/REC-html401-19991224/cover.html#minitoc - HTML v4.1 DOM specs&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/documentation/Cocoa/Conceptual/WebKit_DOM/index.html#//apple_ref/doc/uid/TP40001242"&gt;http://developer.apple.com/documentation/Cocoa/Conceptual/WebKit_DOM/index.html# //apple_ref/doc/uid/TP40001242 - DOM level 2 Specs&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DOCTYPE Links&lt;/b&gt;&lt;br /&gt;&lt;a href="http://alistapart.com/stories/doctype/"&gt;http://alistapart.com/stories/doctype/ - Good and informative, but note that it was written in 2002!  Double check the current standards before using.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html"&gt;http://www.w3.org/QA/2002/04/valid-dtd-list.html - A detailed listing, but does not explain each usage.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.w3.org/TR/html401/struct/global.html"&gt;http://www.w3.org/TR/html401/struct/global.html - Global Structure on an HTML document.  Covers the DOCTYPE.  Good information and a few more links.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/doctype.asp"&gt;http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/doctype.asp - MS’s perspective on DOCTYPE and IE v6.x.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp"&gt;http://msdn.microsoft.com/library/default.asp? url=/library/en-us/dnie60/html/cssenhancements.asp - CSS Enhancements for IE v6.x.&lt;br /&gt;  - This is also an excellent document that identifies what some (or all) of the differences are between compatibility mode and standard-compliant mode.  It should be noted that standards-compliant mode is not measured against the current W3C standards, but the preliminary suggestions.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.htmlhelp.com/reference/html40/html/doctype.html"&gt;http://www.htmlhelp.com/reference/html40/html/doctype.html - Has a fairly good description as to the differences between Strict, Transitional, and Frameset.  The comment about Quirk mode for IE v6.x is incorrect see the table above for the correct usages of the quirks mode with IE v6.x.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-116008630977484790?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/116008630977484790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=116008630977484790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/116008630977484790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/116008630977484790'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/10/useful-links-for-web-development-on.html' title='Useful Links for Web Development on Safari'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-116008557993226244</id><published>2006-10-05T16:48:00.000-05:00</published><updated>2006-10-05T17:14:34.566-05:00</updated><title type='text'>Performance Related Issues with Safari 2.0.x</title><content type='html'>There are some obvious performance issues with Safari.  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;TEXTAREA used in TABLEs&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This is very common problem within some corporate application when trying to deal with any aspect of a table that has many TEXTAREA tags.  The symptoms are a page that is very slow to load, close, update, and refresh.  Assuming there is one TEXTAREA tag per table cell.  Depending upon the processor power of the Mac this may occur with as few as 35 columns with 10 rows to about 30 rows before the response time starts to become unacceptable.&lt;br /&gt;&lt;br /&gt;These performance issues do not exist if the TEXTAREA is replaced by DIV elements and performance can be increased by a factor of about 1500% by using DIV elements instead!&lt;br /&gt;&lt;br /&gt;My guess as to the cause of this that TEXTAREA elements are defined in terms of “rows” and “cols”.  These values do NOT directly map back to the W3C standard units of measurements and I suspect that there is a problem in the translation of rows and cols.&lt;br /&gt;&lt;br /&gt;It is an incorrect usage of the TEXTAREA element to used for formatting of a table cells or other parts of the HTML document.  CSS should be used instead.  I suspect it was just easier for some programmers to specify container size in terms of rows and columns.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Large Select Statements&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Safari tends to have performance issues when a single select statement may have well over a few thousand entries.  An example would be the pick lists for issues such as routing comments.&lt;br /&gt;&lt;br /&gt;There is basically nothing that can be done for these situations except for perhaps reducing the number of entries in the list, which may not be appropriate.  Businesses should be more aware of the nature of the user interface than to expect the user to literally scroll through thousands of entries in a list.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Some Links&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.w3.org/TR/html4/interact/forms.html#h-17.7"&gt;http://www.w3.org/TR/html4/interact/forms.html#h-17.7 - TEXTAREA as defined by the HTML v4.1 standards&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-116008557993226244?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/116008557993226244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=116008557993226244' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/116008557993226244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/116008557993226244'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/10/performance-related-issues-with-safari.html' title='Performance Related Issues with Safari 2.0.x'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-116008464842892627</id><published>2006-10-05T16:43:00.000-05:00</published><updated>2006-10-05T16:44:08.440-05:00</updated><title type='text'>What Browser Platform Should be Used For Development?</title><content type='html'>The question as to what browser platform should be used for developing a web application is a good question to ask.  In the past the answer has been: What is the most popular?  What will support the features?  What will be around in the next 3 years?  What are our developers already familiar with?  &lt;br /&gt;&lt;br /&gt;In the past, if the development was to be kept simple only one browser would be chosen for the target audience.  That has been IE in most circumstances.  &lt;br /&gt;&lt;br /&gt;With today’s emphasis on standards, the answer may not be a specific browser, but more so a given standard.  With the current market shares being held by IE at 84.7%, Firefox at 10.05%, and Safari at 3.19% is a total of 97.94%.  Assume that most IE users will upgrade to v7.x within the first year of release, and you have a profound percent of the population using a W3C standard compliant browser!  So the answer is not what browser you should develop for, but instead what standard.&lt;br /&gt;&lt;br /&gt;The second question is, to what browser’s implementation of the standard should you develop for?  Why?  Because not all browsers will be able to implement 100% of the standard at the same time.  Once again, the answer should not be a specific browser as the target, but instead, what features of the standards are supported by the most browsers should be the question.  &lt;br /&gt;&lt;br /&gt;The goal is to make your application more compliant with what the masses are using.  The best way to achieve that is though generalization of what browsers have currently implemented.  I am sure that when IE v7.x starts to hit the market you will be able to find more resources comparing the low level components of the standards to all browsers.   It should be easier to find out what has been well implemented and what may be best to avoid.&lt;br /&gt;&lt;br /&gt;This philosophy may make the most sense with new development.  It may be difficult to provide an incremental set of changes to an existing application to comply with the new standard, especially if the support of these new standards are being turned on through the DOCTYPE, which is an all or nothing situation in the use of the new standards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-116008464842892627?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/116008464842892627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=116008464842892627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/116008464842892627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/116008464842892627'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/10/what-browser-platform-should-be-used.html' title='What Browser Platform Should be Used For Development?'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-115834206468579459</id><published>2006-09-15T12:40:00.000-05:00</published><updated>2006-09-15T12:54:47.813-05:00</updated><title type='text'>Macs Cursor Keys</title><content type='html'>One thing that can cause some issues when using Safari is that the Mac keyboard (OS) generates different key values for the cursor keys.  Most applications that monitor key strokes will tend to discard any key value that is above 128, so for the Mac, the cursor related keys get ignored or worse yet, generates error messages indicating an invalid key was entered.&lt;br /&gt;&lt;br /&gt;The following are Mac Key Codes values for Cursor related keys:&lt;br /&gt;&lt;table&gt; &lt;tr&gt;&lt;td align=center&gt;&lt;b&gt;Key&lt;/b&gt;&lt;/td&gt;  &lt;td&gt;&lt;b&gt;Code&lt;/b&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td&gt;Up Arrow&lt;/td&gt;    &lt;td&gt;63232&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td&gt;Down Arrow&lt;/td&gt;    &lt;td&gt;63233&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td&gt;Left Arrow&lt;/td&gt;    &lt;td&gt;63234&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td&gt;Right Arrow&lt;/td&gt;    &lt;td&gt;63235&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td&gt;DEL (fn-delete)&lt;/td&gt;    &lt;td&gt;63272&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td&gt;Home (fn-LeftArrow)&lt;/td&gt;    &lt;td&gt;63273&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td&gt;End of Line (fn-RightArrow)&lt;/td&gt;    &lt;td&gt;63275&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td&gt;Page Up (fn-UpArrow)&lt;/td&gt;    &lt;td&gt;63276&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;    &lt;td&gt;Page Down (fn-DownArrow)&lt;/td&gt;    &lt;td&gt;63277&lt;/td&gt;  &lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Please note that when these same keys are tested on IE v6.0.2900 for XP Pro, they did not generate any events within the JavaScript's window.event!  They must be treated like silent modifiers.  I would have thought that at least the DEL key or the BACKSPACE key would have a key code value being trapped. &lt;br /&gt;&lt;p&gt;&lt;br /&gt;One odd key is the ESC on the PC.  It produces a code value of 27 and clears the text area.  I don't know if that is expected or always a desired behavior.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-115834206468579459?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/115834206468579459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=115834206468579459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115834206468579459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115834206468579459'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/09/macs-cursor-keys.html' title='Macs Cursor Keys'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-115409380671178839</id><published>2006-07-28T08:36:00.000-05:00</published><updated>2006-07-28T08:42:28.716-05:00</updated><title type='text'>JavaScript Random Character Generator</title><content type='html'>This is about the generation of random characters.  This is just a quick little generator that I put together so I could populate a dynamic table with specific kinds of data for different columns.&lt;br /&gt;&lt;br /&gt;This generator is included in another blog post, see the references below for more information on how I dynamically created that table.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Purpose&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The purpose for this generator is to create different types of test data of different lengths.  It could be modified or enhanced to fit almost any need.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Character Types&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I have kept the character types simple.  There are numeric, upper and lower cased characters, and a couple mixes of these three types.  No punctuation or spaces are generated.  I was only need single word entities and as such, the need for spaces was not important.  &lt;br /&gt;&lt;br /&gt;If spaces are important, then new character types could be added that would generate sentence or paragraph styled blocks of random characters with spaces randomly places such that the average word size would be about 5 or 6 characters in length.  Matter of fact, the punctuation that could be used could also be integrated such that different statistical benchmarking could influence which punctuation is used and where.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Arrays&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I want to discuss the purpose of the Arrays so they make a little more sense.  The code is documented but if one is not going to use this as I did, then the Arrays may not mean much.&lt;br /&gt;&lt;br /&gt;First off, where this was used was within a dynamically created table.  The size could be as large as the user wants, or as small as one cell.  &lt;br /&gt;&lt;br /&gt;The issue I had, was with how to identify a consistency among the columns as far as what character types they would be and a little more consistency on their length too.  The reason for this, was that I was wanting to have a table that would mimic more or less, a spreadsheet worth of data.  This means that a column that has numbers, should not have any characters in it, same with a column that may represent a name, it should not have numbers interspersed on some rows.  &lt;br /&gt;&lt;br /&gt;Enter the &lt;b&gt;colCharType&lt;/b&gt; and &lt;b&gt;colMaxSize&lt;/b&gt; Arrays.  Using these two Arrays, I can now ensure a character type uniformity that I would not be able to achieve otherwise.  I will also be able to prevent wild ranges of sizes from occurring by specifying a maximum size for the number of characters.  So the columns will be a bit more uniform in their appearance.&lt;br /&gt;&lt;br /&gt;One enhancement would be to add a third Array call &lt;b&gt;colMinSize&lt;/b&gt; which will set the minimum bounds.  The reason why this would be helpful is that if you have a maximum size of 18 on a column you will still get a few rows that will contain nothing or just a few characters.  So for our maximum size of 18, we may want to set a minimum size of 12.  That will really help keep the columns a bit more uniformed looking and would be a great improvement.&lt;br /&gt;&lt;br /&gt;If you have noticed, I have only defined 12 elements in both Arrays.  Didn't I say that the user could enter as many columns as they like?  Of course I did.  I am able to get around this limitation by the use of the modulus operator in JavaScript.  It is extremely useful for conditions such as these.  It is used within the functions &lt;b&gt;getColCharType()&lt;/b&gt; and &lt;b&gt;getColMaxSize()&lt;/b&gt; where the parameter is the column number.  Column 12 uses the 12th element of the Arrays and column 13 uses the first!  So there will be a consistent pattern that will repeat every 12 columns.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Source Code&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I have documented the source code so it should answer most of your questions and explain what is going on.  If you have any questions, please let me know.&lt;br /&gt;&lt;br /&gt;&lt;font size="-2"&gt;&lt;br /&gt;&lt;div style="border: 2px solid #00ff00;width:500px;height:400px;overflow: scroll;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;script type='text/javascript'&amp;gt;&lt;br /&gt;&lt;br /&gt;/* Random Character Generator - Copyright 2006 by Scott Tabar - tabarATfuseDOTnet&lt;br /&gt; *&lt;br /&gt; * All of these functions were created from scratch, except where noted.  &lt;br /&gt; * I grant you the right to do what ever you wish with these.   &lt;br /&gt; * All I ask is that you give me credit for what I have created.  If these scripts&lt;br /&gt; * will be used in a product that will make you or an entity money in any shape or&lt;br /&gt; * form, I just want to let you know that I don't expect a single penny of it.  I&lt;br /&gt; * would be honored if you will drop me a line to let me know what product it was &lt;br /&gt; * used in with a reference to company name, URL, ISBN, etc.  &lt;br /&gt; *&lt;br /&gt; * The initial purpose for the random character generators was&lt;br /&gt; * to allow random text to be generated within table cells to test sorting &lt;br /&gt; * performance on an arbitrary table size that could be dynamically changed without&lt;br /&gt; * reloading the page.  Functions and arrays have been created to be able &lt;br /&gt; * to provide a reproducible data type for a given column so there will be consistency&lt;br /&gt; * when a column is sorted.&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;/* These character types are used to define what kind of random data should&lt;br /&gt; * be generated for a given cell. &lt;br /&gt; */&lt;br /&gt;var CHAR_TYPE_NUMERIC = 1;&lt;br /&gt;var CHAR_TYPE_CHAR = 2;&lt;br /&gt;var CHAR_TYPE_CHAR_UPPER = 3;&lt;br /&gt;var CHAR_TYPE_CHAR_LOWER = 4;&lt;br /&gt;var CHAR_TYPE_MIXED = 5;&lt;br /&gt;&lt;br /&gt;/* This array defines what data type should be generated for the given column &lt;br /&gt; */&lt;br /&gt;var colCharType = new Array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CHAR_TYPE_MIXED,      CHAR_TYPE_MIXED,      CHAR_TYPE_MIXED,   &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CHAR_TYPE_CHAR_LOWER, CHAR_TYPE_CHAR_UPPER, CHAR_TYPE_CHAR,  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CHAR_TYPE_CHAR,       CHAR_TYPE_CHAR,       CHAR_TYPE_NUMERIC, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CHAR_TYPE_NUMERIC,    CHAR_TYPE_NUMERIC,    CHAR_TYPE_NUMERIC);&lt;br /&gt;&lt;br /&gt;/* This array defines the max number of characters that should be generated for&lt;br /&gt; * the given column.  With a value of 10, the column will then have from none&lt;br /&gt; * to 10 characters generated.&lt;br /&gt; */&lt;br /&gt;var colMaxSize = new Array( 10, 4, 4, 10, 1, 2, 18, 8, 4, 10, 10, 2 );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/* This function takes any integer number as a parameter and maps &lt;br /&gt; * it to the set in the colCharType array by returning the appropriate&lt;br /&gt; * value from that array as if the array repeats infinitely.&lt;br /&gt; *&lt;br /&gt; * This function uses the modulus function to remap the integer parameter&lt;br /&gt; * to a usable value.&lt;br /&gt; */&lt;br /&gt;function getColCharType( x )&lt;br /&gt;{&lt;br /&gt;    return colCharType[ x % colCharType.length ];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/* This function takes any integer number as a parameter and maps &lt;br /&gt; * it to the set in the colMaxSize array by returning the appropriate&lt;br /&gt; * value from that array as if the array repeats infinitely.&lt;br /&gt; *&lt;br /&gt; * This function uses the modulus function to remap the integer parameter&lt;br /&gt; * to a usable value.&lt;br /&gt; */&lt;br /&gt;function getColMaxSize( x )&lt;br /&gt;{&lt;br /&gt;    return colMaxSize[ x % colMaxSize.length ];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* This function actually performs all of the generation of random data based upon&lt;br /&gt; * the two parameters charType and length.  Length defines the maximum length, not&lt;br /&gt; * a fixed length such that if the value is 10, then result could have a length of&lt;br /&gt; * zero or anything up to a length of 10 characters.&lt;br /&gt; *&lt;br /&gt; * Currently, no character type generates punctuation or white spaces.  It is&lt;br /&gt; * intended to generate simple single "word" entities.  &lt;br /&gt; */&lt;br /&gt;function rndText( charType, length )&lt;br /&gt;{&lt;br /&gt;  var result = "";&lt;br /&gt;&lt;br /&gt;  for( var x = 0; x &lt; length; x++ )&lt;br /&gt;  {&lt;br /&gt;    var cType = charType;&lt;br /&gt;&lt;br /&gt;    if ( cType == CHAR_TYPE_MIXED ) {&lt;br /&gt;      cType = (Math.round(Math.random() * 3) + 1);&lt;br /&gt;    } &lt;br /&gt;    if ( cType == CHAR_TYPE_CHAR ) {&lt;br /&gt;      cType = (Math.round(Math.random() * 1) + 3);&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    if ( cType == CHAR_TYPE_NUMERIC ) {&lt;br /&gt;      result += createRandomNumbers();&lt;br /&gt;    } else&lt;br /&gt;    if ( cType == CHAR_TYPE_CHAR_UPPER ) {&lt;br /&gt;      result += createRandomUpperCaseLetter();&lt;br /&gt;    } else&lt;br /&gt;    if ( cType == CHAR_TYPE_CHAR_LOWER ) {&lt;br /&gt;      result += createRandomLowerCaseLetter();&lt;br /&gt;    } &lt;br /&gt;  }&lt;br /&gt;  return result;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Returns a random number between zero and the numeric value of the parameter.&lt;br /&gt; */&lt;br /&gt;function rndNumMax( maxNum )&lt;br /&gt;{&lt;br /&gt;  return Math.round(Math.random() * maxNum);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Returns one character that is randomly selected between 0 and 9.&lt;br /&gt; * &lt;br /&gt; * Thanks to wwww.CodeHouse.com for the following inspiration:&lt;br /&gt; * http://www.codehouse.com/javascript/tips/random_letter/&lt;br /&gt; */&lt;br /&gt;function createRandomNumbers()&lt;br /&gt;{&lt;br /&gt;   return String.fromCharCode(48 + Math.round(Math.random() * 9));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Returns one character that is randomly selected between a and z.&lt;br /&gt; * &lt;br /&gt; * Thanks to wwww.CodeHouse.com for the following inspiration:&lt;br /&gt; * http://www.codehouse.com/javascript/tips/random_letter/&lt;br /&gt; */&lt;br /&gt;function createRandomLowerCaseLetter()&lt;br /&gt;{&lt;br /&gt;   return String.fromCharCode(97 + Math.round(Math.random() * 25));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Returns one character that is randomly selected between a and Z.&lt;br /&gt; * &lt;br /&gt; * Thanks to wwww.CodeHouse.com for the following inspiration:&lt;br /&gt; * http://www.codehouse.com/javascript/tips/random_letter/&lt;br /&gt; */&lt;br /&gt;function createRandomUpperCaseLetter()&lt;br /&gt;{&lt;br /&gt;   return String.fromCharCode(65 + Math.round(Math.random() * 25));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://scott-tabar-safari.blogspot.com/2006/07/safari-table-sorting-performance-issue.html"&gt;Dynamic Table Generation - Where this rnd char generation is at work!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.codehouse.com/javascript/tips/random_letter/"&gt;Creating random characters&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-115409380671178839?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/115409380671178839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=115409380671178839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115409380671178839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115409380671178839'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/07/javascript-random-character-generator.html' title='JavaScript Random Character Generator'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-115402307355028908</id><published>2006-07-27T12:44:00.000-05:00</published><updated>2006-07-27T14:30:14.860-05:00</updated><title type='text'>Safari Table Sorting Performance Issue</title><content type='html'>This document will provide simple steps to have a dynamic table generator run in your browser.  You can use this to generate large tables of various sizes to see how different browsers perform when sorting tables.&lt;br /&gt;&lt;br /&gt;Unfortunately, this blog does not allow the use of scripts, so enclosed in the following text box is all the code for one web page.  A few steps to take now for hours of enjoyment.  &lt;b&gt;Yes, I know, I need to get a server to post these simple test pages to!  &lt;/b&gt;&lt;br /&gt;&lt;br /&gt; 1. Select everything in the box and then copy it to the clipboard.  May be tricky... sorry... Try selecting a few rows at the top, then scroll to the bottom, then with the SHIFT key being held down, click the mouse below the final line which contains &amp;lt&amp;/html&amp;gt&gt;&lt;br /&gt; 2. Open a text editor and paste it in a new document.  &lt;br /&gt; 3. Save that document with any name, such as SafariDynamicTable.html.  &lt;br /&gt; 4. Next follow the link below to download the Standardista Table Sort code and save the enclosed folder in the same directory.&lt;br /&gt; 5. Open the saved HTML document, such as SafariDynamicTable.html in the browser of your choice.&lt;br /&gt;&lt;br /&gt;&lt;font size="-2"&gt;&lt;br /&gt;&lt;div style="border: 2px solid #00ff00;width:500px;height:400px;overflow: scroll;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;  &amp;lt;head&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;title&gt;Safari Table Sorting - Performance Issues&amp;lt;/title&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type='text/javascript'&gt;&lt;br /&gt;&lt;br /&gt;/* Random Character Generator - Copyright 2006 by Scott Tabar - tabarATfuseDOTnet&lt;br /&gt; *&lt;br /&gt; * All of these functions were created from scratch, except where noted.  &lt;br /&gt; * I grant you the right to do what ever you wish with these.   &lt;br /&gt; * All I ask is that you give me credit for what I have created.  If these scripts&lt;br /&gt; * will be used in a product that will make you or an entity money in any shape or&lt;br /&gt; * form, I just want to let you know that I don't expect a single penny of it.  I&lt;br /&gt; * would be honored if you will drop me a line to let me know what product it was &lt;br /&gt; * used in with a reference to company name, URL, ISBN, etc.  &lt;br /&gt; *&lt;br /&gt; * The initial purpose for the random character generators was&lt;br /&gt; * to allow random text to be generated within table cells to test sorting &lt;br /&gt; * performance on an arbitrary table size that could be dynamically changed without&lt;br /&gt; * reloading the page.  Functions and arrays have been created to be able &lt;br /&gt; * to provide a reproducible data type for a given column so there will be consistency&lt;br /&gt; * when a column is sorted.&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;/* These character types are used to define what kind of random data should&lt;br /&gt; * be generated for a given cell. &lt;br /&gt; */&lt;br /&gt;var CHAR_TYPE_NUMERIC = 1;&lt;br /&gt;var CHAR_TYPE_CHAR = 2;&lt;br /&gt;var CHAR_TYPE_CHAR_UPPER = 3;&lt;br /&gt;var CHAR_TYPE_CHAR_LOWER = 4;&lt;br /&gt;var CHAR_TYPE_MIXED = 5;&lt;br /&gt;&lt;br /&gt;/* This array defines what data type should be generated for the given column &lt;br /&gt; */&lt;br /&gt;var colCharType = new Array(&lt;br /&gt; CHAR_TYPE_MIXED, CHAR_TYPE_MIXED, CHAR_TYPE_MIXED,   CHAR_TYPE_CHAR_LOWER, CHAR_TYPE_CHAR_UPPER, CHAR_TYPE_CHAR,  &lt;br /&gt;        CHAR_TYPE_CHAR,  CHAR_TYPE_CHAR,  CHAR_TYPE_NUMERIC, CHAR_TYPE_NUMERIC,    CHAR_TYPE_NUMERIC,    CHAR_TYPE_NUMERIC);&lt;br /&gt;&lt;br /&gt;/* This array defines the max number of characters that should be generated for&lt;br /&gt; * the given column.  With a value of 10, the column will then have from none&lt;br /&gt; * to 10 characters generated.&lt;br /&gt; */&lt;br /&gt;var colMaxSize = new Array( 10, 4, 4, 10, 1, 2, 18, 8, 4, 10, 10, 2 );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/* This function takes any integer number as a parameter and maps &lt;br /&gt; * it to the set in the colCharType array by returning the appropriate&lt;br /&gt; * value from that array as if the array repeats infinitely.&lt;br /&gt; *&lt;br /&gt; * This function uses the modulus function to remap the integer parameter&lt;br /&gt; * to a usable value.&lt;br /&gt; */&lt;br /&gt;function getColCharType( x )&lt;br /&gt;{&lt;br /&gt;    return colCharType[ x % colCharType.length ];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/* This function takes any integer number as a parameter and maps &lt;br /&gt; * it to the set in the colMaxSize array by returning the appropriate&lt;br /&gt; * value from that array as if the array repeats infinitely.&lt;br /&gt; *&lt;br /&gt; * This function uses the modulus function to remap the integer parameter&lt;br /&gt; * to a usable value.&lt;br /&gt; */&lt;br /&gt;function getColMaxSize( x )&lt;br /&gt;{&lt;br /&gt;    return colMaxSize[ x % colMaxSize.length ];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* This function actually performs all of the generation of random data based upon&lt;br /&gt; * the two parameters charType and length.  Length defines the maximum length, not&lt;br /&gt; * a fixed length such that if the value is 10, then result could have a length of&lt;br /&gt; * zero or anything up to a length of 10 characters.&lt;br /&gt; *&lt;br /&gt; * Currently, no character type generates punctuation or white spaces.  It is&lt;br /&gt; * intended to generate simple single "word" entities.  &lt;br /&gt; */&lt;br /&gt;function rndText( charType, length )&lt;br /&gt;{&lt;br /&gt;  var result = "";&lt;br /&gt;&lt;br /&gt;  for( var x = 0; x &lt; length; x++ )&lt;br /&gt;  {&lt;br /&gt;    var cType = charType;&lt;br /&gt;&lt;br /&gt;    if ( cType == CHAR_TYPE_MIXED ) {&lt;br /&gt;      cType = (Math.round(Math.random() * 3) + 1);&lt;br /&gt;    } &lt;br /&gt;    if ( cType == CHAR_TYPE_CHAR ) {&lt;br /&gt;      cType = (Math.round(Math.random() * 1) + 3);&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    if ( cType == CHAR_TYPE_NUMERIC ) {&lt;br /&gt;      result += createRandomNumbers();&lt;br /&gt;    } else&lt;br /&gt;    if ( cType == CHAR_TYPE_CHAR_UPPER ) {&lt;br /&gt;      result += createRandomUpperCaseLetter();&lt;br /&gt;    } else&lt;br /&gt;    if ( cType == CHAR_TYPE_CHAR_LOWER ) {&lt;br /&gt;      result += createRandomLowerCaseLetter();&lt;br /&gt;    } &lt;br /&gt;  }&lt;br /&gt;  return result;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Returns a random number between zero and the numeric value of the parameter.&lt;br /&gt; */&lt;br /&gt;function rndNumMax( maxNum )&lt;br /&gt;{&lt;br /&gt;  return Math.round(Math.random() * maxNum);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Returns one character that is randomly selected between 0 and 9.&lt;br /&gt; * &lt;br /&gt; * Thanks to wwww.CodeHouse.com for the following inspiration:&lt;br /&gt; * http://www.codehouse.com/javascript/tips/random_letter/&lt;br /&gt; */&lt;br /&gt;function createRandomNumbers()&lt;br /&gt;{&lt;br /&gt;   return String.fromCharCode(48 + Math.round(Math.random() * 9));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Returns one character that is randomly selected between a and z.&lt;br /&gt; * &lt;br /&gt; * Thanks to wwww.CodeHouse.com for the following inspiration:&lt;br /&gt; * http://www.codehouse.com/javascript/tips/random_letter/&lt;br /&gt; */&lt;br /&gt;function createRandomLowerCaseLetter()&lt;br /&gt;{&lt;br /&gt;   return String.fromCharCode(97 + Math.round(Math.random() * 25));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Returns one character that is randomly selected between a and Z.&lt;br /&gt; * &lt;br /&gt; * Thanks to wwww.CodeHouse.com for the following inspiration:&lt;br /&gt; * http://www.codehouse.com/javascript/tips/random_letter/&lt;br /&gt; */&lt;br /&gt;function createRandomUpperCaseLetter()&lt;br /&gt;{&lt;br /&gt;   return String.fromCharCode(65 + Math.round(Math.random() * 25));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type='text/javascript'&gt;&lt;br /&gt;&lt;br /&gt;/* Dynamic Table Generator - Copyright 2006 by Scott Tabar - tabarATfuseDOTnet&lt;br /&gt; *&lt;br /&gt; * All of these functions were created from scratch, except where noted.  &lt;br /&gt; * I grant you the right to do what ever you wish with these.   &lt;br /&gt; * All I ask is that you give me credit for what I have created.  If these scripts&lt;br /&gt; * will be used in a product that will make you or an entity money in any shape or&lt;br /&gt; * form, I just want to let you know that I don't expect a single penny of it.  I&lt;br /&gt; * would be honored if you will drop me a line to let me know what product it was &lt;br /&gt; * used in with a reference to company name, URL, ISBN, etc.  &lt;br /&gt; *&lt;br /&gt; * The initial purpose for the random character generators was&lt;br /&gt; * to allow random text to be generated within table cells to test sorting &lt;br /&gt; * performance on an arbitrary table size that could be dynamically changed without&lt;br /&gt; * reloading the page.  Functions and arrays have been created to be able &lt;br /&gt; * to provide a reproducible data type for a given column so there will be consistency&lt;br /&gt; * when a column is sorted.&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function buildTable()&lt;br /&gt;{&lt;br /&gt;  var rows = document.getElementById( "rows" ).value;&lt;br /&gt;  var cols = document.getElementById( "cols" ).value;&lt;br /&gt;  var useTextareas = document.getElementById( "useTextarea" ).checked;&lt;br /&gt;&lt;br /&gt;  buildTable2( rows, cols, useTextareas );&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;/* This function will build a table based upon the given parameters for the number&lt;br /&gt; * of columns and rows.  It will fill in each cell with randomly generated data &lt;br /&gt; * based which the data type and max length of the data will be defined by the &lt;br /&gt; * column position.  &lt;br /&gt; *&lt;br /&gt; * There is a third parameter useTextareas which will enclose the random data &lt;br /&gt; * if it is desired to be used.  The purpose of the use of the TEXTAREA tag is &lt;br /&gt; * to get a feel for sorting performance when the table cell contains more than &lt;br /&gt; * just plain text.  Matter of fact, try generating a table with the dimensions&lt;br /&gt; * of 50 x 100 first without TEXTAREA and then with.  Observe how much slower&lt;br /&gt; * the sorting can be.&lt;br /&gt; *&lt;br /&gt; */&lt;br /&gt;function buildTable2( maxRows, maxCols, useTextareas )&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;  // Build Header&lt;br /&gt;  var thr = document.getElementById( "tableHeaderRow" );&lt;br /&gt;  for( var x = 0; x &lt; maxCols; x++ )&lt;br /&gt;  {&lt;br /&gt;      var cell = document.createElement("th");&lt;br /&gt;      cell.innerHTML = "Col " + (x + 1);&lt;br /&gt;      thr.appendChild(cell);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  // Build body&lt;br /&gt;  var tb = document.getElementById( "tableBody" );&lt;br /&gt;&lt;br /&gt;  for( var y = 0; y &lt; maxRows; y++ )&lt;br /&gt;  {&lt;br /&gt;    var row = document.createElement("tr");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    for( var x = 0; x &lt; maxCols; x++ )&lt;br /&gt;    {&lt;br /&gt;        var cell = document.createElement("td");&lt;br /&gt;&lt;br /&gt; if ( useTextareas ) &lt;br /&gt;        {&lt;br /&gt;            var textArea = document.createElement("textarea");&lt;br /&gt;        &lt;br /&gt;            textArea.rows = 2;&lt;br /&gt;            textArea.cols = 6;&lt;br /&gt;            textArea.innerHTML = rndText( getColCharType(x), rndNumMax( getColMaxSize(x) ) );&lt;br /&gt;&lt;br /&gt;            cell.appendChild( textArea );&lt;br /&gt;        } else {&lt;br /&gt;            cell.innerHTML = rndText( getColCharType(x), rndNumMax( getColMaxSize(x) ) );&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        row.appendChild(cell);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    tb.appendChild(row);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* This function removes the headers from the table and also the body.  It prepares the&lt;br /&gt; * table to be regenerated.&lt;br /&gt; */ &lt;br /&gt;function clearTable()&lt;br /&gt;{&lt;br /&gt;  // clear Header&lt;br /&gt;  var thr = document.getElementById( "tableHeaderRow" );&lt;br /&gt;  while ( thr.hasChildNodes() ) {&lt;br /&gt;    thr.removeChild( thr.lastChild );&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  // Clear body&lt;br /&gt;  var tb = document.getElementById( "tableBody" );&lt;br /&gt;  while ( tb.hasChildNodes() ) {&lt;br /&gt;    tb.removeChild( tb.lastChild );&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* This function rebuilds the actual table.  It assembles all of the parameters and&lt;br /&gt; * calls all functions in the proper order.&lt;br /&gt; * &lt;br /&gt; * This function logs performance status to the screen so the user will know how long&lt;br /&gt; * it takes to clear a table or to build a table.  It also logs the characteristics of&lt;br /&gt; * each table when it regenerates it.&lt;br /&gt; *&lt;br /&gt; * Finally at the end, it makes a call to the Standardist Table Sorting init funtion&lt;br /&gt; * to have the regenerated table re-enabled for the auto sorting.  It should be noted &lt;br /&gt; * that the STS function named headingClicked has been slightly modified to record &lt;br /&gt; * performance information to the on-screen log.  The first line of the function has&lt;br /&gt; * the following added:&lt;br /&gt; *   var date1 = new Date();&lt;br /&gt; * and the very last few lines have the following added right before the "return false;":&lt;br /&gt; *   var date2 = new Date();&lt;br /&gt; *   var debug = document.getElementById( "debug" ).innerHTML;&lt;br /&gt; *   debug += "Time to sort table " + (date2 - date1) + " ms.&amp;lt;br&amp;gt;";&lt;br /&gt; *   document.getElementById( "debug" ).innerHTML = debug;&lt;br /&gt; *&lt;br /&gt; */&lt;br /&gt;function rebuildTable()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;  var date1 = new Date();&lt;br /&gt;  clearTable();&lt;br /&gt;  var date2 = new Date();&lt;br /&gt;  &lt;br /&gt;  var date3 = new Date();&lt;br /&gt;  buildTable();&lt;br /&gt;  var date4 = new Date();&lt;br /&gt;&lt;br /&gt;  var rows = document.getElementById( "rows" ).value;&lt;br /&gt;  var cols = document.getElementById( "cols" ).value;&lt;br /&gt;  var useTextareas = document.getElementById( "useTextarea" ).checked;&lt;br /&gt;&lt;br /&gt;  var debug = document.getElementById( "debug" ).innerHTML;&lt;br /&gt;&lt;br /&gt;  debug += "Time to clear old table " + (date2 - date1) + " ms. ";&lt;br /&gt;  debug += "Time to build new table " + (date4 - date3) + " ms: " + &lt;br /&gt;            rows + " rows x " + cols + " cols with" + &lt;br /&gt;            (useTextareas ? "" : "out") + " TEXTAREAs. &amp;lt;br&amp;gt;";&lt;br /&gt;&lt;br /&gt;  document.getElementById( "debug" ).innerHTML = debug;&lt;br /&gt; &lt;br /&gt;  // Calls the Stanardista Table Sorting init function to re-enable the regenerated table.&lt;br /&gt;  standardistaTableSortingInit();&lt;br /&gt;&lt;br /&gt;  return false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/* Calls buildTable() function on page load.&lt;br /&gt; */&lt;br /&gt;window.onload = function() { buildTable(); };&lt;br /&gt;&amp;lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;/head&gt;&lt;br /&gt;  &amp;lt;body&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;H1&gt;Safari Table Sorting - Performance Issues&amp;lt;/H1&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;p&gt;&lt;br /&gt;This test dynamically builds a table and allows you to dynamically alter the table size at any time.  It uses randomly generated data to fill the table cells, of which all cells contain a TEXTAREA element to add to the complexity level of the sorting. &lt;br /&gt;&lt;br /&gt;&amp;lt;p&gt;&lt;br /&gt;This table uses a non-intrusive table sorting JavaScript function.  It is called Standardista Table Sorting by Neil Crosby.  See the link under references.  What makes this so nice, is that it goes out on it's own and finds all the tables that are in need of being setup for sorting and then it puts the hooks in to each column heading.  It is very easy to setup and it runs very quickly on small trivial tables.  I used this source code to reconfirm that the sorting is being performed correctly and that nothing odd is going on.  I did find out that a replaceChild() would remove a node before it adds it to the end if that node already exists in the parent.  This means that more code can be eliminated due to not having to track and manually remove any obsolete or duplicated nodes.  ie... performance gain!&lt;br /&gt;&lt;br /&gt;&amp;lt;p&gt;&lt;br /&gt;Sadly though, performance does suck when the quantity of data approaches what is typical for UGS.  That is 37 columns and about 100+ rows.  Of which it takes about 209 seconds!  100 rows with 50 columns takes AlMOST 500 seconds to sort when using TEXTAREA!&lt;br /&gt;&lt;br /&gt;&amp;lt;p&gt;&lt;br /&gt;To use this, when it initially loads, it will build a 8 rows x 37 columns table and you can dynamically change the table size at any time.  It includes wrapping all generated text with a TEXTAREA tag initially.  Transaction information will be logged to the screen and will not be lost during resizing of the table.  If the table parameters are changed and the Rebuild Table button is CLICKED, it will regenerate the whole table dynamically without performing a page reload.&lt;br /&gt;&lt;br /&gt;&amp;lt;br&gt;&amp;lt;br&gt;&lt;br /&gt;&amp;lt;b&gt;Runtime Log:&amp;lt;/b&gt;&lt;br /&gt;&amp;lt;div id="debug"&gt;Initial table is 8 rows x 37 cols.&amp;lt;br&gt; &amp;lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;table&gt;&lt;br /&gt;  &amp;lt;tr&gt;&lt;br /&gt;    &amp;lt;td&gt;Rows:&amp;lt;/td&gt;&amp;lt;td&gt;&amp;lt;input type=text size="10" id="rows" value="8" /&gt;&amp;lt;/td&gt;&lt;br /&gt;    &amp;lt;td&gt;Cols:&amp;lt;/td&gt;&amp;lt;td&gt;&amp;lt;input type=text size="10" id="cols" value="37" /&gt;&amp;lt;/td&gt;&lt;br /&gt;    &amp;lt;td&gt;Use TEXTAREAs?:&amp;lt;/td&gt;&amp;lt;td&gt;&amp;lt;input type=checkbox id="useTextarea" value="TEXTAREA" checked /&gt;&amp;lt;/td&gt;&lt;br /&gt;    &amp;lt;td&gt;&amp;lt;input type=button value="Rebuild Table" onClick="rebuildTable();" /&gt;&amp;lt;/td&gt;&lt;br /&gt;  &amp;lt;/tr&gt;&lt;br /&gt;&amp;lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type='text/javascript' src='standardista_table_sorting/common.js'&gt;&amp;lt;/script&gt;&lt;br /&gt;&amp;lt;script type='text/javascript' src='standardista_table_sorting/css.js'&gt;&amp;lt;/script&gt;&lt;br /&gt;&amp;lt;script type='text/javascript' src='standardista_table_sorting/standardista-table-sorting.js'&gt;&amp;lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;table class="sortable" cellspacing=0 cellpadding=1 border=1&gt;&lt;br /&gt;  &amp;lt;col width="200px"&gt;&amp;lt;/col&gt;&lt;br /&gt;  &amp;lt;colgroup width="200px"&gt;&amp;lt;/colgroup&gt;&lt;br /&gt;&amp;lt;thead&gt;&lt;br /&gt;  &amp;lt;tr id="tableHeaderRow"&gt;&lt;br /&gt;  &amp;lt;/tr&gt;&lt;br /&gt;&amp;lt;/thead&gt;&lt;br /&gt;&amp;lt;tfoot&gt;&lt;br /&gt;  &amp;lt;tr&gt;&lt;br /&gt;    &amp;lt;td colspan="8" align="right"&gt;&amp;lt;b&gt;Dummy Totals:&amp;lt;/b&gt;&amp;lt;/td&gt;&lt;br /&gt;    &amp;lt;td&gt;&amp;lt;b&gt;2388&amp;lt;/b&gt;&amp;lt;/td&gt;&lt;br /&gt;    &amp;lt;td&gt;&amp;lt;b&gt;482 Days&amp;lt;/b&gt;&amp;lt;/td&gt;&lt;br /&gt;    &amp;lt;td&gt;&amp;lt;b&gt;293,398,283.93&amp;lt;/b&gt;&amp;lt;/td&gt;&lt;br /&gt;  &amp;lt;/tr&gt;&lt;br /&gt;&amp;lt;/tfoot&gt;&lt;br /&gt;&amp;lt;tbody id="tableBody"&gt;&amp;lt;/tbody&gt;&lt;br /&gt;&amp;lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;b&gt;References&amp;lt;/b&gt;&amp;lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;a href="http://www.workingwith.me.uk/articles/scripting/standardista_table_sorting"&gt;Table Sorting with Safari support - Standardista Table Sorting&amp;lt;/a&gt; &amp;lt;br /&gt;&lt;br /&gt;&amp;lt;a href="http://sourceforge.net/project/showfiles.php?group_id=162528"&gt;Download Standardista Table Sorting from SourceForge.net&amp;lt;/a&gt;&amp;lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;a href="http://www.codehouse.com/javascript/tips/random_letter/"&gt;Creating random characters&amp;lt;/a&gt; &amp;lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;/body&gt;&lt;br /&gt;&amp;lt;/html&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What Is So Dynamic About This Table?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The table that is generated can be regenerated on the fly without having to reload the page.  It logs all transactions: clearing the table, building the table, and sorting the table.  It is good to see what happens under different conditions such as table size (large number of rows vs columns or vice-a-versa) and plain text versus text enclosed in an HTML tag (TEXTAREA is used in this test, but it can be any tag like Anchor or DIV).&lt;br /&gt;&lt;br /&gt;You have control of the table size.  Change the value and regenerate the table.  Go ahead, it is fun to see how large you can make it and what your browser does with it.  If you make it too large and you do perform a sort, it may lockup your browser for quite a while until the JavaScript is done.  WARNING: There is no way to terminate it except for killing the browser!  So be fore warned!&lt;br /&gt;&lt;br /&gt;The table sort algorithm is all dynamic.  Which means as you regenerate the table, the table will automatically be prepared for being sortable on any number of columns.  The only catch is that the TABLE has the class="sortable" and the table must contain a TBODY element.  See the link below for additional information on the Standardista Table Sort code by Neil Crosby.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt; Adding Performance Logging in STS!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Why would you want to?  Good question!  Because it will record how long it took to perform each sort.  So when you resize the table, you will still be able to see the prior results.&lt;br /&gt;&lt;br /&gt;How?  Follow these simple directions...&lt;br /&gt;1) Modify the file named standardista_table_sorting/standardista-table-sorting.js.  Change the function named headingClicked with the two following modifications:&lt;br /&gt; a) To the first line of the function add:&lt;br /&gt;    &lt;pre&gt;&lt;code&gt;   var date1 = new Date(); &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt; b) To the very last few lines right before the "return false;":&lt;br /&gt;    &lt;pre&gt;&lt;code&gt;   var date2 = new Date();&lt;br /&gt;    var debug = document.getElementById( "debug" ).innerHTML;&lt;br /&gt;    debug += "Time to sort table " + (date2 - date1) + " ms.&amp;lt;br&amp;gt;";&lt;br /&gt;    document.getElementById( "debug" ).innerHTML = debug;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;2) Save the changes and reload the test page.&lt;br /&gt;&lt;br /&gt;Now every time a sort is performed, it will be logged on the screen.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to Use&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;First try to sort any column.  Notice how an arrow indicates what column it is sorted by and in what direction.  Try a few other columns.  Note the log entries that are being added at the top of the page.&lt;br /&gt;&lt;br /&gt;Go ahead and change the number of rows and columns and click on the Rebuild Table button, but for this time make the table smaller than it defaults to.  You can have all the auto generated text be placed inside TEXTAREA tags, which will illustrate how bogged down JavaScript can become when table cells contain more than just simple plain text.  &lt;br /&gt;&lt;br /&gt;Now make the table 100 rows and 50 columns without the TEXTAREA.  Rebuild the table.  Try a few sorts.  Then click the check box to enable the TEXTAREA tags and then rebuild the table.  Click on one column and wait.  Be prepared to wait for awhile.  It is running and it will end, but give it about 500 seconds!  Of course it depends upon your CPU and system platform, but you will notice that when TEXTAREA tags are used, it grinds to a halt!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;One Bug in STS!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Please note that I have found both a bug and a fix for the same bug.  I have submitted a bug report on SourceForge.net and I am sure Neil or one of his friends will apply the bug fix as soon as they are able.&lt;br /&gt;&lt;br /&gt;The nature of this bug is due to the unusual way I am using STS.  Unusual in the fact that the STS init function is actually called more than once.  As such, there is a slight glitch that occurs.&lt;br /&gt;&lt;br /&gt;This glitch is that the number of rows in the table will be doubled.&lt;br /&gt;&lt;br /&gt;How to reproduce this?  Easy, click on any column, say column 5.  Regenerate the table. No you don't have to change any settings.  Then click on the same column to sort the newly generated table.  The results, the rows are doubled.&lt;br /&gt;&lt;br /&gt;As an exercise you can figure out what is causing it.  Hint: Has to do with the behavior of appendChild(), but not directly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Safari Sorting Issue&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you have not figured it out, Safari is VERY slow when it comes to sorting tables that contain more than just plain text.  In our example I have used TEXTAREA to contain the generated text, but it can be just about any other tag too.&lt;br /&gt;&lt;br /&gt;I don't think the issue is so much the TEXTAREA tag, as much as inserting or removing rows that have many cells with the nested nodes within a table.  So I am not sure what exactly is going on, but I do suspect the engine that renders the content in Safari, or the engine that is updating the DOM is has TONS of work it has to perform.  There has to be a more efficient way of doing what ever it is doing, since IE for windows is fairly quick with the same work load.  Personally I suspect when a node is added, it performs a text based paste in to the "spot", then it has to regenerate the whole DOM.  I don't think it is truly treating a Node as an object and just simply inserting the reference to that object in the parent's list of childNodes.  if it were, then I would expect quicker response.  But then again, re-rendering the whole document (if that is what is happening) may be consuming so much of the time too.&lt;br /&gt;&lt;br /&gt;Is there any way to improve the performance?  Not really.  I have tried a few things and I have actually attained better performance than what STS is able to achieve, but it is a propriety script going against a special condition and I took liberties to optimize it.  Since STS is very dynamic and nonintrusive, the same mods cannot be made to it.  If anybody knows of a way to kick up the performance when using TEXTAREAs, please let me know!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.workingwith.me.uk/articles/scripting/standardista_table_sorting"&gt;Table Sorting with Safari support - Standardista Table Sorting&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/project/showfiles.php?group_id=162528"&gt;Download Standardista Table Sorting from SourceForge.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.codehouse.com/javascript/tips/random_letter/"&gt;Creating random characters&lt;/a&gt; &lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-115402307355028908?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/115402307355028908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=115402307355028908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115402307355028908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115402307355028908'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/07/safari-table-sorting-performance-issue.html' title='Safari Table Sorting Performance Issue'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-115350755270302771</id><published>2006-07-21T13:44:00.000-05:00</published><updated>2006-07-28T22:48:57.563-05:00</updated><title type='text'>Safari and the broken JavaScript TD.cellIndex property</title><content type='html'>There is a JavaScript property that Safari does not properly implement.  It is the TD.cellIndex.  It always returns a zero value.&lt;br /&gt;&lt;br /&gt;Where would such a property would be used?  Most commonly in sorting of HTML tables through JavaScript.  Generally, the header cell of each column has an &lt;b&gt;onClick="tableSort(this);"&lt;/b&gt; so within the sorting function, through the use of &lt;b&gt;cellIndex&lt;/b&gt; the JavaScript will know what column the user wants to sort, and through multiple uses of &lt;b&gt;parentElement&lt;/b&gt; the function can back out to the TBODY element of the TABLE to work with the contained nodes which contains the &lt;b&gt;TR&lt;/b&gt; elements and each &lt;b&gt;TR&lt;/b&gt; element contains more nodes which are the TD elements.  &lt;br /&gt;&lt;br /&gt;Simple?  Make Sense? Good! Now you can probably figure out on your own how to perform a dynamic sort on an HTML table without relying upon any other JavaScript.  That gives me an idea on another Blog Posting... Hyper Table Sorting!  Coming soon to a browser near you!&lt;br /&gt;&lt;br /&gt;This is a simple fix.  If it is ever fixed in a future release of Safari, it will automatically disable itself (except when the true value of cellIndex is zero) to help ensure the best performance.&lt;br /&gt;&lt;br /&gt;There are a few assumptions to keep this example simple:&lt;br /&gt;  1) the object that is passed in to this function will only be a &lt;b&gt;TD&lt;/b&gt; object.&lt;br /&gt;  2) It is an acceptable performance hit to always go through the &lt;b&gt;for&lt;/b&gt; loop when the true cellIndex is zero.  The first element will be picked off, so the hit should not be too bad.  The general consensus being that the first column of a table may be the default sort column so the odds of it be resorted on that column is reduced.&lt;br /&gt;  3) Safari browsers will be common. If they were not, may want to add a hook such as "isSafari &amp;&amp; obj.cellIndex == 0" to allow other browsers to bypass the &lt;b&gt;for&lt;/b&gt; loop.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function cellIndexFn( obj )&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;var ci = ( obj.cellIndex == 0 ? -1 : obj.cellIndex );&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;for ( var x = 0; ci == -1 &amp;&amp; x &lt; obj.parentElement.cells.length; x++ )&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ( obj === obj.parentElement.cells[x] ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ci = x;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;return ci;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The following is a simple way to test for a Safari browser:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;var isSafari = navigator.userAgent.indexOf("Safari") != -1;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The modified code that will contain the check for Safari to minimize the performance hit:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function cellIndexFn( obj )&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;var isSafari = navigator.userAgent.indexOf("Safari") != -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;var ci = ( isSafari &amp;&amp; obj.cellIndex == 0 ? -1 : obj.cellIndex );&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;for ( var x = 0; ci == -1 &amp;&amp; x &lt; obj.parentElement.cells.length; x++ )&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ( obj === obj.parentElement.cells[x] ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ci = x;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;return ci;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Referances&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.sitepoint.com/article/dhtml-utopia-modern-web-design/3"&gt;This page covers many good ideas and topics, but see example 3.27 and the related code around it.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/internet/webcontent/objectdetection.html"&gt;Great article in Object Detection.  Can help prevent many pitfalls with future releases to any browser.  A must read!&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-115350755270302771?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/115350755270302771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=115350755270302771' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115350755270302771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115350755270302771'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/07/safari-and-broken-javascript.html' title='Safari and the broken JavaScript TD.cellIndex property'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-115288298709181284</id><published>2006-07-14T08:15:00.000-05:00</published><updated>2006-07-14T09:16:01.430-05:00</updated><title type='text'>MacBook Pro Review</title><content type='html'>I have been working with a 17" MacBook Pro for about three weeks now.  There are some nice features about it and some that I think could be improved upon.  Instead of creating a long boring document that details every last item, I am going to just simply put the pros and cons in a simple list.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The good!&lt;/b&gt;&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;+&lt;/font&gt;&lt;/b&gt; Large 17" screen is bright and clear!&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;+&lt;/font&gt;&lt;/b&gt; The large 17" screen is easy to open.&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;+&lt;/font&gt;&lt;/b&gt; There is a power meter built in to the battery.  Push the button and 5 LEDs show you the power level.&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;+&lt;/font&gt;&lt;/b&gt; Illuminated keyboard.  It is nice how the keys glow!&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;+&lt;/font&gt;&lt;/b&gt; Duel Intel processors!  Intel?  Intel!  Gee that still sounds odd!  After all those years of Motorola it almost does not feel right.  I guess it is now safe to stop bashing Intel? ;-)&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;+&lt;/font&gt;&lt;/b&gt; Most applications having built-in spell checking!  It appears to be an OS hook.&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;+&lt;/font&gt;&lt;/b&gt; Long battery life.  It appears like I can get about 3 to 3.5 hours of documenting and web surfing on a fully charged battery.  The time may be longer if the keyboard back lighting or the screen were turned all the way down.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Bad!&lt;/b&gt;&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;-&lt;/font&gt;&lt;/b&gt; The Large 17" screen is only designed to sit on a horizontal surface.  The screen does not want to stay open if the computer is tilted at angles of around 25 degrees or more.  This can make it difficult to use in a chair or bed if your feet are up.&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;-&lt;/font&gt;&lt;/b&gt; The large 17 screen is too small!  Well at least the resolution.  It is 1680x1050 which is not large enough to view 1080i HiDef QuickTime movies at 100% resolution.  About 25% of the width gets cut off of the Car's trailer when viewing the 1080i trailer.&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;-&lt;/font&gt;&lt;/b&gt; The power meter that is built in to the battery may not be too accurate.  The other day I shut down the computer and when I saw it started to close the desktop I stuck it in the computer bag.  About 6 hours later I found the contents of the bag hot not to mention the computer.  It must have hung during shutdown.  Well, the battery was dead since it would not power on the computer but the power meter did show 2 LEDs.  &lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;-&lt;/font&gt;&lt;/b&gt; The keyboard.  Not enough keys to perform the common tasks.  Usually have to use modifiers, such as CTRL, OPTION, or APPLE which can be a pain at times, if there is even a mapping!&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;-&lt;/font&gt;&lt;/b&gt; The keyboard when booting Windows XP and you need to perform a CTRL-ALT-DEL to log on to the computer!&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;-&lt;/font&gt;&lt;/b&gt; Single button track pad.  Many applications require the use of a right-click to be fully functional.  I am finding that I have to hold down the CTRL key frequently when clicking in order to get my work done.  Too much additional hand movements are required.&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;-&lt;/font&gt;&lt;/b&gt; The touch pad is too far away from the keyboard.  You have to take your hand off the keyboard to use it, so it tends to waste some time.  Same goes for the track pad button.&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;-&lt;/font&gt;&lt;/b&gt; PC Isolation!  Ok, I have not tried to use XP too much in the last three weeks (give me a good reason why ;-) ), but here are a few things that irk me.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;font size="+2"&gt;-&lt;/font&gt;&lt;/b&gt; When the mac is up and running, I cannot copy any files to the PC partition.  This dumb founds me!  Perhaps it is a permissions thing...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;font size="+2"&gt;-&lt;/font&gt;&lt;/b&gt; When the windows XP is up and running, there is NO access to the Mac hard drive.  So right now, there is NO way to transfer files between the OSes or even to share.  Major pain!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Novel! &lt;/b&gt;&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;!&lt;/font&gt;&lt;/b&gt; The latch.  Yeah it is neat!  There are two metal spring loaded hooks that sit in the lid of the laptop (the springs hold them up).  They are flush with the case and will not catch anything when the lid is open.  But as the lid comes close to the base unit (as in closing the lid), there are magnets that pull the hooks down to engage in holding the lid close.  Yes I know it is not a new gadget for the Mac notebooks, (I also have a g3 notebook with the same kind of hooks), but it sure beats those plastic fangs that are common place on the PC notebooks.&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;!&lt;/font&gt;&lt;/b&gt; The sensors to enable the keyboard lighting are two in number and located under the speaker grills.  The first one is to the left of the power button almost around the 7 O'Clock position: Cover it with your finger.  The second one is in the left speaker at the top, about one inch from the left.  To find the second one, slowly drag your finger across the top of the left speaker grill cover.  If all else fails, use your whole hand to cover both grills. &lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;!&lt;/font&gt;&lt;/b&gt; The power connector!  Good use for magnets (that and the lid latches).  It is interesting that it actually is not plugged in, but just being held in contact with the contacts. It also self aligns so it simple to hook up.  If they have a more powerful magnet, then it could plug itself in if the two connectors were in the same vicinity of say an inch or two: just lay the MBP on the desk and it auto plugs itself in... no docking!  As it is, for the last week, when I have been getting the MBP setup on the desk, I just pass the top left corner near the plug as I set it on the desk and it does plug itself in automatically!  No kidding!  It does have to come within about 1/3 of an inch to perform this feat!&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;!&lt;/font&gt;&lt;/b&gt; When the computer is off, hold the open lid between your eyes and a strong light source with the LCD facing you.  An image of an apple will appear on the screen.  No it is not magic, but if you cannot think what causes it, I will not spoil your fun in trying to figure it out.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Enhancements / Features?&lt;/b&gt;&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;?&lt;/font&gt;&lt;/b&gt; The keyboard.  There is the space...&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;?&lt;/font&gt;&lt;/b&gt; The rear hinge has a rubber strip which is about 55% the width of the computer.  It would be nice to have a similar rubber strip running near the front of the computer on the bottom side.  The case as it is, is thin and slick.  It will make the computer a bit easier to hold on to.&lt;br /&gt; &lt;b&gt;&lt;font size="+2"&gt;?&lt;/font&gt;&lt;/b&gt; In keeping with the theme of magnetic power cable, can Apple come up with a magnetic docking station?  Perhaps all they would need is Networking, phone, firewire, and USB.  That can be done with a few simple connectors, right?  ;-)  Actually, if the connector is similar to the power with about 4 metal pins, then centered between a few of the pins could be optical connectors so the data transfer could be done via digital optics.  I am sure low powered LASERs should be fairly cheap by now, and the bandwidth of one fiber channel should handle the bandwidth of firewire, USB, and networking combined!  Yeah that's the ticket!  They could even call it FiberDoc!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-115288298709181284?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/115288298709181284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=115288298709181284' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115288298709181284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115288298709181284'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/07/macbook-pro-review.html' title='MacBook Pro Review'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-115220575893940581</id><published>2006-07-06T12:08:00.000-05:00</published><updated>2006-07-06T12:38:11.410-05:00</updated><title type='text'>Safari TEXTAREA No Scroll Bars</title><content type='html'>Safari may not treat TEXTAREA tags the same as with other web browsers when it comes to displaying scroll bars.  There are two different causes for the lack of scroll bars, both of which I do have some solutions.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;TEXTAREA rows Set to a Value Which is Too Small To Display&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;The first problem is an easy one to fix.  The problem is that if TEXTAREA rows is set to a value less than 5, it cannot display the scroll bars.  The reason for this, is that it takes all five rows to display the smallest slider and the two stacked arrow buttons below it.  If Safari cannot display the graphics for the slider, it omits them altogether and instead shows a gray bar on the right-hand side of the TEXTAREA.&lt;br /&gt;&lt;br /&gt;Keep in mind that depending upon what font size you are using and the characteristics of that font, the minimum number of rows may differ.  But generally for the plain default for Safari should be around 5 rows.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Some Examples of this problem - All have the same amount of text:&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;TEXTAREA - 1 Row - No Scroll bar:&lt;br /&gt;&lt;textarea cols="40" rows="1" name=""&gt;123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 &lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;TEXTAREA - 2 Rows - No Scroll bar:&lt;br /&gt;&lt;textarea cols="40" rows="2" name=""&gt;123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 &lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;TEXTAREA - 3 Rows - No Scroll bar:&lt;br /&gt;&lt;textarea cols="40" rows="3" name=""&gt;123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 &lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;TEXTAREA - 4 Rows - No Scroll bar:&lt;br /&gt;&lt;textarea cols="40" rows="4" name=""&gt;123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 &lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;TEXTAREA - 5 Rows - Scroll bar!!!:&lt;br /&gt;&lt;textarea cols="40" rows="5" name=""&gt;123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 &lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;Observe on this last example how the scroll bar is at its smallest.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Safari TEXTAREA does not always Display a Scroll Bar when Rows is 5 or Greater&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Believe it or not, but just because you set rows to 5 on the TEXTAREA tag, does not ensure that you will always get a scroll bar when you need it. Why?  I don't know.  I think it is a legitimate bug on Safari's behalf.&lt;br /&gt;&lt;br /&gt;The nature of this issue is that if you have rows set to five, the scroll bars will not appear until the text actually spans down to row seven!  While the text is 6 rows long, you either cannot see the first row or the last row depending upon the position of the cursor.&lt;br /&gt;&lt;br /&gt;The solution to this problem, is that instead of fully in-lining your text as follows:&lt;br /&gt;&amp;lt;textarea cols="20" rows="5"&amp;gt;Please assume there is six lines of text here!&amp;lt;/textarea&amp;gt;&lt;br /&gt;&lt;br /&gt;Just add a linefeed to the end of the text so that way the &amp;lt;/textarea&amp;gt; tag begins on a new line in the source document.  Back on your application server, you may have to strip off any trailing whitespace to preserve data integrity, if it is even an issue.  An example would be:&lt;br /&gt;&amp;lt;textarea cols="20" rows="5"&amp;gt;Please assume there is six lines of text here!&lt;br /&gt;&amp;lt;/textarea&amp;gt;&lt;br /&gt;&lt;br /&gt;The way this solution works, is that when your actual text finally overflows on to row 6, because you added that extra linefeed to the source, it is actually overflowing to row 7 and enables the scroll bar.  &lt;br /&gt;&lt;br /&gt;The user cannot really see that extra linefeed and does not really realize it is there.  This solution does allow the TEXTAREAs to be properly displayed with scroll bars upon page load if they need it.  &lt;br /&gt;&lt;br /&gt;The limitation that this has, is with the actual users.  If the position the cursor after the final linefeed and they start typing before the text rows reach that threshold, then the same behavior will occur, unfortunately.  Play around with the example below to see how it behaves.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt; EXAMPLE of Bad Overflow&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;TEXTAREA - 5 Rows - 4 Rows of text PLUS Linefeed - No Scroll Bar: &lt;br /&gt;&lt;textarea cols="40" rows="5" name=""&gt;123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789  &lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;TEXTAREA - 5 Rows - 5 Rows of text PLUS Linefeed - No Scroll Bar: &lt;br /&gt;&lt;textarea cols="40" rows="5" name=""&gt;123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789  &lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;TEXTAREA - 5 Rows - 6 Rows of text PLUS Linefeed - Scroll Bar!: &lt;br /&gt;&lt;textarea cols="40" rows="5" name=""&gt;123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 &lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;TEXTAREA - 5 Rows - 4 Rows of text NO Linefeed - No Scroll Bar: &lt;br /&gt;&lt;textarea cols="40" rows="5" name=""&gt;123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 &lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;TEXTAREA - 5 Rows - 5 Rows of text NO Linefeed - No Scroll Bar: &lt;br /&gt;&lt;textarea cols="40" rows="5" name=""&gt;123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 &lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;TEXTAREA - 5 Rows - 6 Rows of text NO Linefeed - No Scroll Bar: &lt;br /&gt;&lt;textarea cols="40" rows="5" name=""&gt;123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 &lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;TEXTAREA - 5 Rows - 7 Rows of text NO Linefeed - Scroll Bar!: &lt;br /&gt;&lt;textarea cols="40" rows="5" name=""&gt;123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 &lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;PLEASE READ - Problems with the Examples!&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;How wonderful blogging is.  Once again the examples have unexpected results when posted through the blog!  In the source code I do have a linefeed, but the blog went ahead and inserted a &amp;lt;br /&amp;gt; in its place.  So all of these examples are a bit hosed.  I will need to try to find a way to preserve the linefeed.  If anyone can provide the answer, I would greatly appreciate it!&lt;br /&gt;&lt;br /&gt;Believe it or not, even though the &amp;lt;br /&amp;gt; has been added, all of the examples are displaying correctly in Safari as the headings state: So if it says it has no scroll bar, it has none.  If it says it has a scroll bar, then it does have a scroll bar.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Other Information&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;It should also be noted that Safari also support the attribute &lt;b&gt;wrap&lt;/b&gt; which is not part of the HTML 4.01 standard.  Possible values are: &lt;b&gt;soft&lt;/b&gt;, &lt;b&gt;hard&lt;/b&gt;, and &lt;b&gt;off&lt;/b&gt;. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;How Other Browsers Handle these Conditions&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;First off, let me state that I do not have access currently to too many different browsers.  If you have one that is not listed in this list or of a different version that behaves differently, please post a message stating how it handles these conditions.  Thanks you!&lt;br /&gt;&lt;br /&gt;&lt;B&gt;Safari v2.0.3 - Mac OS X v10.4.6 - MacBook Pro - 2.16 GHz Intel Core Duo - &lt;/b&gt;All tests and comments based up this configuration. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;FireFox v1.5.0.4 - Mac OS X v10.4.6 - MacBook Pro - 2.16 GHz Intel Core Duo - &lt;/b&gt;There are no issues with the vertical scroll bar.  It appears like when ever text does overflow, FireFox always displays the vertical scroll bar.  One thing FireFox does do differently, is that when you set rows to 1 it displays 2 rows.  At a minimum it displays the slider and the slider starts to cover up the two arrow buttons as needed.  So when it is displaying two rows of text (rows=1) you just see the slider.  When three rows of text (rows=2) you see the slider plus the down arrow button.  Four and more rows you can see the slider and both buttons.  So it appears like in all cases that I have setup for testing, the actual display is 1 line more than what rows has been set to.  &lt;br /&gt;Another obvious difference, is that FireFox enables the horizontal scroll bar for long text that has no spaces.  If there are no spaces in the text, FireFox will not wrap it.  That said, FireFox does give higher priority to wrapping text to try and eliminate the horizontal scroll bar.  Safari will wrap long text with no spaces.  The extra linefeed is NOT needed with FireFox nor is there any issue with any line of text overflowing without scroll bars being enabled.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;References&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/StandardHTMLTags.html"&gt;Apple's Safari HTML Reference - Standard HTML Tags&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-115220575893940581?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/115220575893940581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=115220575893940581' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115220575893940581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115220575893940581'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/07/safari-textarea-no-scroll-bars.html' title='Safari TEXTAREA No Scroll Bars'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-115211170244141595</id><published>2006-07-05T09:50:00.000-05:00</published><updated>2006-08-25T11:12:35.593-05:00</updated><title type='text'>Dynamically Sized TEXTAREA</title><content type='html'>I would like to share a little bit of JavaScript that I wrote: How to Make the TEXTAREA Dynamically Sizable so all text will be visible without the need of scroll bars.  The purpose is to display all the text without scroll bars and to minimize the amount of white space between the end of the text and the bottom of the box.&lt;br /&gt;&lt;br /&gt;This should work on most current browsers.  Tested with Safari v2.0.3.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; BACKGROUND&lt;/b&gt;&lt;br /&gt;One of the issues with browser compatibility is in how the HTML TEXTAREA behaves within Safari.  I will cover that topic later in detail.  &lt;br /&gt;&lt;br /&gt;An odd behavior with Apple's Safari browser is the way the HTML tag TEXTAREA deals with text that overflows the TEXTAREA's visible box.  The issue is that when the TEXTAREA has text that overflows, it does not display the scroll bars until two lines of text have overflowed.  Thus the first line of text is unaccessible or visible when typing at the end of the text, or the last line when typing any where else when the overflow condition first occurs.  This can lead to text that is not viewable by the users, or at least difficult to view.  This even manifests itself when displaying the data for the first time to the user: if the data overflows by one line, it will not display the scroll bars and the user will not be able to view that last line of data.&lt;br /&gt;&lt;br /&gt;One solution to this problem is to have the users click within the TEXTAREA and either move the cursor with the arrow keys, or drag the cursor with the mouse to force the TEXTAREA to scroll the text manually even without the scroll bars.  As you can guess, this would not be viable solution that the users would even accept (or at least lets hope the users won't accept this kind of a solution!).&lt;br /&gt;&lt;br /&gt;Where this can become an issue, even if the scroll bars function as expected, is if the users are printing the contents of a page that makes use of a TEXTAREA with overflowing text.  All the text will not be printed. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;THE CODE - First the Basics&lt;/b&gt;&lt;br /&gt;There are three parts to the code.  The first is the JavaScript that performs the adjustment in the height.  The second is putting the hooks within the TEXTAREA, with the last being the general call to preset the TEXTAREAs when the page is initially loaded.&lt;br /&gt;&lt;br /&gt;First lets start off with the primary JavaScript.  This should be placed within the document's header section.&lt;br /&gt;&lt;br /&gt;This function updateTextareaHeight() will take the contents of the TEXTAREA that is being passed to this function and calculate the "theoretical" number of rows it should have.  If the TEXTAREA element is displaying the text in a fixed width font, then it would be fairly accurate in the length, but if it is using a  variable width font, then the number of rows may be overstated, but all text should be displayed.&lt;br /&gt;&lt;br /&gt;The way it works is by counting not only the number of linefeeds (new lines), but it also takes (or tries to) in to consideration wrapping text, which becomes the extraRows value.  The way it determines if text may wrap in this example, is to take to total length of the text in the TEXT area and divides it by the number of columns the TEXTAREA is configured for.    If the sum of the extraRows and linefeed count does not match was the current value is for the TEXTAREA's rows attribute, then it is updated.  &lt;br /&gt;&lt;br /&gt;Please keep in mind that this is very simplistic in nature and will not perform well under all conditions.  Matter of fact it can be broken quite easily.  One technique that works well, is by using very large word sizes such that there are many word wraps with large amounts of white space to the right of the words, but very few, if any, linefeeds are used.  This first example just illustrates what can be done in terms of simplicity.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;/*&lt;br /&gt; * Copyright 2006 by Scott Tabar&lt;br /&gt; * Usage is granted as long as this credit remains in place.&lt;br /&gt; * If used in a production/commerical product, then please drop &lt;br /&gt; * me a line at http://scott-tabar-safari.blogspot.com&lt;br /&gt; */&lt;br /&gt;function updateTextareaHeight(obj)&lt;br /&gt;{&lt;br /&gt;  if ( obj == null ) {&lt;br /&gt;    return false;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  // NOTE: This is using regular expressions to count spaces and linefeeds&lt;br /&gt;  var objText = obj.value;&lt;br /&gt;&lt;br /&gt;  var linefeedsArray = objText.match(/[\n\r]/g);&lt;br /&gt;  var linefeeds = ( linefeedsArray == null ? 0 : linefeedsArray.length);&lt;br /&gt;  var extraRows = Math.round( objText.length / obj.cols );&lt;br /&gt;&lt;br /&gt;  var newRows = linefeeds + extraRows;&lt;br /&gt;&lt;br /&gt;  if ( newRows != obj.rows )  {&lt;br /&gt;    obj.rows=newRows;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;br /&gt;An example of how the JavaScript would be used within the TEXTAREA tag is as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;textarea cols="20" rows="4" onkeyup="updateTextareaHeight(this);" &lt;br /&gt;        id="ta01"&amp;gt;Some text goes here!&amp;lt;/textarea&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;To precondition the resizing of the text area, you can either attach a JavaScript function to the BODY's onload event which will get called when the page is done being loaded.  Or just place some JavaScript in-line with the document, but at the end after all referenced TEXTAREAs.  This will resize them while the page is still loading (ie... loading images).  NOTE: Many TEXTAREAs can be pre-sized this way.&lt;br /&gt;&lt;pre&gt;&amp;lt;script&amp;gt;&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;updateTextareaHeight( document.getElementById( "ta01" ) );&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That is the basics on what mechanisms need to be in place to auto size a TEXTAREA.  See the next section on discussion about how to improve the sizing to eliminate overflow conditions or large amount of white space at the bottom of the text.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;EXAMPLE - More Complex But More Accurate&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example combines all of the three code fragments listed above.  To reset the example, just reload the page and start anew.&lt;br /&gt;&lt;br /&gt;NOTE: Sorry... This blog will not support the use of the script tag so I can not in-line an example.  So until I can find an alternative way of presenting it,  you can just copy and paste the following into a new text document and open with your browser of choice.&lt;br /&gt;&lt;br /&gt;If you done any playing around with the example above, you will be quick to find that it does not work too well.  The concept may work great, but trying to guess what the user has typed in and how the browser is displaying the information is yet another thing altogether.  The reason why this is so difficult, is that the TEXTAREA object does not report the actualRows that the text actually occupies.  if it did, then this task would be quite simple.  &lt;br /&gt;&lt;br /&gt;Why is it so difficult to predict how many rows of text there will be?  The answer lies in the complexity that is given by modern browsers: you can configure or change just about any aspect of how the TEXTAREA is displayed or how the font is rendered.  You no longer are limited to just the plain font that the browser defaults to, but you can specify a specific font (and numerous backups if that one does not exist on the client's computer), font size, the font weight, kerning, tracking, horizontal and vertical spacing, font stretching, margins, and etc...  Matter of fact, you can even write a JavaScript function that can take one character at a time and perform progressive or random changes so that a paragraph could contain a rainbow of colors, or each character could be a different size and font!  So to put it mildly, the sky is the limit on how we can present the text in a TEXTAREA.  Don't forget word wrapping in the TEXTAREA for that may be out of our control (aside from hinting that can be performed).&lt;br /&gt;&lt;br /&gt;In the following example, I have added a few more matrices to try and better tune the control of how the TEXTAREA is sized.  There are a few areas that I have tried to quantify to see if better control can be attainable.  Next is a list of these measures and how they are "supposed" to help! ;-)&lt;br /&gt;&lt;br /&gt;1.  fontFamilyAdj - This is a very simplistic implementation.  It assumes that the Courier font is the only mono-spaced font you will be using, and all other fonts will be proportionally spaced.  This does fit our example so keep it in mind if you need to expand upon it.  It assumes that for a monospaced font, that the weight should be greater than 1.0 for less characters can fit on a line in a TEXTAREA compared to a proportionally spaced font.  For example, enter all lowercase i's.  Conversely though, try entering all uppercase W's too.  The point being, on average, more characters will fit per line with proportionally spaced characters.&lt;br /&gt;&lt;br /&gt;2.  linfeeds - Since we are using RegularExpressions to count the linefeeds and also the spaces and large words, there exists the strong chance that none exists, and as such a null will be returned.  So in the cases were we are needing to count the elements of the result array to get our numbers, there is used an intermediate variable to hold such a value.  This prevents the need to perform the Regular Expression twice: first to see if there are any results, second to get the count of the results.  Anyway for linefeeds, we are only counting newlines and carriage returns.  We are not interested in vertical tabs, form feeds, or others.&lt;br /&gt;&lt;br /&gt;3.  spaces - Counting the number of spaces can give us the average word size.  We can also use the spaces and linefeeds when the density get very low to improve the accuracy, but in this example, it is not implemented as such (ie... low density conditions with a high ratio of linefeeds + spaces implies that there is really nothing to the document except for the linefeeds so using just the linefeeds may be the most accurate result).  &lt;br /&gt;&lt;br /&gt;4.  avgWordSize - This really is not being used in the example below.  Perhaps in combination with largeWordSize and adjColumns you can find an equation that would estimate the amount amount of white space that is caused by word wrapping.  This could improve the estimation of the number of rows quite considerably.&lt;br /&gt;&lt;br /&gt;5.  adjColumns - Uses the fontFamilyAdj value to modify the column size to more accurately express how many characters really does fit on one line in a TEXTAREA.&lt;br /&gt;&lt;br /&gt;6.  largeWordSize - This is the smallest size for a large word, which can cause a large waste of white space if a large word is actually wrapped.  This is the factor that tries to keep the TEXTAREA from overflowing if many big words are used.&lt;br /&gt;&lt;br /&gt;7. largeWordCount - The number of large words that exist in the document.&lt;br /&gt;&lt;br /&gt;8.  density - Takes the adjColumns and multiplies it by the number of linefeeds and the extraRows (as calculated up to that point) to arrive at a theoretical number of characters that can fit in the TEXTAREA.  It then uses that number as the divisor for the total character count of the text.  The density, when very high indicates there are less linefeeds or other conditions involved and that the number of rows can be a few less.  When the density appears to fall between .2 and .7, then there tends to be a larger number of linefeeds and/or larger words which can increase the likelihood of  word wrapping and as such, more lines are needed to prevent an overflow condition.  The value of linefeeds are also backed off a little under these conditions too.  But when the density is less than .2, then you will find a high number of linefeeds.&lt;br /&gt;&lt;br /&gt;9.  newRows - is the combined total of the linefeeds and the final value of extraRows.  Only if this value changes will the TEXTAREA.rows be modified.&lt;br /&gt;&lt;br /&gt;One thing to note, is that currently, this code is not perfect.  It behaves much better for medium to large amounts of text, but if you start typing words it will start resizing it self all over the place.  Yes it does need some fine tuning, but the point I was wanting to make is that it is NOT an easy task and that there are many variables involved.  The addition of &lt;pre&gt; &amp;&amp; objText.length &gt; adjColumns &amp;&amp; linefeeds &gt; 0&lt;/pre&gt; to the density check really adds a fair amount of stability to keep the box from jumping.  Try removing it to see what happens.&lt;br /&gt;&lt;br /&gt;&lt;div  style="border: 2px solid #ff0000;width: 40em;"&gt;&lt;pre style="font-size:-1;"&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;  &amp;lt;head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;/*&lt;br /&gt; * Copyright 2006 by Scott Tabar&lt;br /&gt; * Usage is granted as long as this credit remains in place.&lt;br /&gt; * If used in a production/commerical product, then please drop &lt;br /&gt; * me a line at http://scott-tabar-safari.blogspot.com&lt;br /&gt; */&lt;br /&gt;function updateTextareaHeight(obj)&lt;br /&gt;{&lt;br /&gt;  if ( obj == null ) {&lt;br /&gt;    return false;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  // NOTE: This is using regular expressions to count spaces and linefeeds&lt;br /&gt;  var objText = obj.value;&lt;br /&gt;  var fontFamilyAdj = obj.style.fontFamily == "Courier" ? 1.1 : .9;&lt;br /&gt;  var linefeedsArray = objText.match(/[\n\r]/g);&lt;br /&gt;  var linefeeds = ( linefeedsArray == null ? 0 : linefeedsArray.length);&lt;br /&gt;  var spacesArray =    objText.match(/[ \t]/g);&lt;br /&gt;  var spaces = ( spacesArray == null ? 1 : spacesArray.length + 1);&lt;br /&gt;&lt;br /&gt;  var avgWordSize = Math.round( obj.value.length / spaces + .5);&lt;br /&gt;  // A large word is greater than 35% of the adj cols&lt;br /&gt;  var adjColumns = Math.round(obj.cols / fontFamilyAdj);&lt;br /&gt;  var largeWordSize = Math.round( adjColumns * .35 );&lt;br /&gt;&lt;br /&gt;  var regExpStr = "\\w{" + largeWordSize + ",}";&lt;br /&gt;  var largeWordArray = objText.match( new RegExp( regExpStr, "g" ));&lt;br /&gt;  var largeWordCount = (largeWordArray == null ? 0 : largeWordArray.length);&lt;br /&gt;&lt;br /&gt;  var extraRows = Math.round( obj.value.length / adjColumns) + 1;&lt;br /&gt;  extraRows += Math.round( largeWordCount * .5 );&lt;br /&gt;&lt;br /&gt;  // Density tries to measure large white space vs ideal fill&lt;br /&gt;  var density = Math.round( objText.length / (adjColumns * &lt;br /&gt;                        (linefeeds + extraRows)) * 100 ) / 100;&lt;br /&gt;  if ( density &lt; .7 &amp;&amp; density &gt; .2 &amp;&amp; &lt;br /&gt;        objText.length &gt; adjColumns &amp;&amp; linefeeds &gt; 0 ) {&lt;br /&gt;    extraRows += Math.round( fontFamilyAdj / density + .5);&lt;br /&gt;    extraRows -= Math.round( linefeeds * (linefeeds &lt; 20 ? .2 : .1) );&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  var newRows = linefeeds + extraRows;&lt;br /&gt;&lt;br /&gt;  var debugStr = "TEXTAREA id=" + obj.id + " newRows= " + newRows + &lt;br /&gt;       " linefeeds=" + linefeeds + " extraRows=" + extraRows +&lt;br /&gt;       " density=" + density + &lt;br /&gt;       " fontFamilyAdj=" + fontFamilyAdj + &lt;br /&gt;       " spaces=" + spaces +&lt;br /&gt;       " avgWordSize=" + avgWordSize + " cols=" + obj.cols + &lt;br /&gt;       " adjColumns=" + adjColumns + &lt;br /&gt;       " largeWordsize=" + largeWordSize + &lt;br /&gt;       " largeWordCount=" + largeWordCount;&lt;br /&gt;  document.getElementById( "debugText" ).innerText = debugStr;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  if ( newRows != obj.rows )  {&lt;br /&gt;    obj.rows=newRows;&lt;br /&gt;  }&lt;br /&gt;}&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;/head&amp;gt;&lt;br /&gt;  &amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt&gt;Dynamically Sized TEXTAREA&amp;lt;/h1&amp;gt;&lt;/pre&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;textarea cols="20" rows="4" onkeyup="updateTextareaHeight(this);" id="textarea01" style="font-family:Times;"&amp;gt;This is an example of a Proportional Font! Some text goes here!  I have taken the liberty to add a little more text for this example to show how the TEXTAREA can be dyanmically adjusted in height when the page is initially loaded.  Please remember from the example above that the original TEXTAREA was only 20 columns wide (and still is) but was only 4 rows high.  There should be no scroll bars!&amp;lt;/textarea&amp;gt;&lt;br /&gt;&amp;lt;textarea cols="20" rows="4" onkeyup="updateTextareaHeight(this);" id="textarea02" style="font-family:Courier;"&amp;gt;This is an example of a Fixed Width Font!  Some text goes here!  I have taken the liberty to add a little more text for this example to show how the TEXTAREA can be dyanmically adjusted in height when the page is initially loaded.  Please remember from the example above that the original TEXTAREA was only 20 columns wide (and still is) but was only 4 rows high.  There should be no scroll bars!&amp;lt;/textarea&amp;gt;&lt;/code&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;b&amp;gt;Debug Information&amp;lt;/b&amp;gt;&lt;br /&gt;&amp;lt;div id="debugText" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;{&lt;br /&gt;   updateTextareaHeight( document.getElementById( "textarea01" ) );&lt;br /&gt;   updateTextareaHeight( document.getElementById( "textarea02" ) );&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;  &amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;OTHER CONSIDERATIONS&lt;/b&gt;&lt;br /&gt;Please be advised that if you use &lt;pre&gt;line-height&lt;/pre&gt; and change the browser's default, then it will effect the behavior in one of two ways.  1) If the value is set too hight, say around 190% or greater, it will increase the likelihood of the text overflowing the TEXTAREA so scroll bars will appear.  2) If it is set to a very small value, say 10%, then more than one line can overflow before the scroll bars appear.  Remember, the whole purpose of the Dynamically Sized TEXTAREA to to display the full text in a TEXTAREA element without the use of the scroll bars and to minimize the amount of white space between the end of the text and the bottom of the box.&lt;br /&gt;&lt;br /&gt;Also note that proportional fonts will be a bit more tricky to trying to reduce the amount of white space at the end of the text and the prevention of the scroll bars from appearing.  This may require a bit more fine tuning of the equation/technique involved.&lt;br /&gt;&lt;br /&gt;The biggest issue you may find with fixed width fonts, is the way they tend to wrap text on a word boundry.  This is fine, unless your column width is too narrow and there are large words such that there there tends to be a fair amount of white space to the right of a line when that lines contains no linefeed.&lt;br /&gt;&lt;br /&gt;One alternative would be to use the TEXTAREA only for editing.  If there is a page that will be read-only or used for printing, then it may be a better idea to use a DIV tag instead with a style="border:2px solid #000000;width=20em;", for example.  This will place all contained text within a box.  Do not set the height and this box will adjust for the height of the text.  This especially would be best for printing.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;REFERENCES&lt;/b&gt;&lt;br /&gt;  &lt;a href="http://www.javascriptkit.com/jsref/regexp.shtml"&gt;Information on Regular Expressions.  Some good information on JavaScript too.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-115211170244141595?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/115211170244141595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=115211170244141595' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115211170244141595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115211170244141595'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/07/dynamically-sized-textarea.html' title='Dynamically Sized TEXTAREA'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-115210415768902913</id><published>2006-07-05T07:52:00.000-05:00</published><updated>2006-07-05T07:57:16.546-05:00</updated><title type='text'>MacBook Pro and the CTRL-ALT-DEL Keys</title><content type='html'>The MacBook Pro (MBP) combined with Bootcamp allows the Mac to run Windows XP natively.  The catch being that when the MBP's XP is configured to use a corporate domain it requires the use of CTRL-ALT-DEL to get to the login screen when the MBP's keyboard does not have an DEL key.  &lt;br /&gt;&lt;br /&gt;Enter the Windows Utility Manager.  This tool allows you to turn on and off the various accessibility programs.  You can turn off the text reader which will read just about everything on the screen.  But what you are really wanting to do is to turn on the On-Screen Keyboard program.  On Windows XP you use the Windows key + U to activate the Windows Utility Manager.&lt;br /&gt;&lt;br /&gt;On the MBP when booting XP the Apple key is mapped to the Windows key.  At the start screen when it is asking you to press CTRL-ALT-DEL key, press Apple + U key combination.  Once the Windows Utility manger starts, you can go ahead and start the on-Screen Keyboard program.  Now hold down the CTRL-ALT keys on the MBP keyboard and then use the mouse to click on the DEL key on the On-Screen Keyboard.&lt;br /&gt;&lt;br /&gt;Once you are able to get in to Windows, yes you can remap the keys, but you must make it to windows in the first place.&lt;br /&gt;&lt;br /&gt;REFERENCES:&lt;br /&gt;&lt;a href="http://www.windowsnetworking.com/articles_tutorials/Windows-XP-Keyboard-Shortcuts.html"&gt;http://www.windowsnetworking.com/articles_tutorials/Windows-XP-Keyboard-Shortcuts.html - Tip 7&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-115210415768902913?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/115210415768902913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=115210415768902913' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115210415768902913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115210415768902913'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/07/macbook-pro-and-ctrl-alt-del-keys.html' title='MacBook Pro and the CTRL-ALT-DEL Keys'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30441114.post-115159098935189801</id><published>2006-06-29T09:18:00.000-05:00</published><updated>2006-06-29T10:02:44.493-05:00</updated><title type='text'>The Quest For Browser Compatibility!</title><content type='html'>Greetings!&lt;br /&gt;&lt;br /&gt;I have just embarked on a new mission: to make a large web project Mac compatible using Apple's Safari browser.&lt;br /&gt;&lt;br /&gt;This blog will document as many details that I can put together on the subject of not only Safari compatibility, but also browser compatibility in general.&lt;br /&gt;&lt;br /&gt;Within the next month or so, I hope there will be all kinds of useful information that will be useful to yourself too!&lt;br /&gt;&lt;br /&gt;Enjoy!   Scott&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30441114-115159098935189801?l=scott-tabar-safari.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scott-tabar-safari.blogspot.com/feeds/115159098935189801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30441114&amp;postID=115159098935189801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115159098935189801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30441114/posts/default/115159098935189801'/><link rel='alternate' type='text/html' href='http://scott-tabar-safari.blogspot.com/2006/06/quest-for-browser-compatibility.html' title='The Quest For Browser Compatibility!'/><author><name>Scott Tabar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
