<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Expressing IT &#187; JavasScript</title>
	<atom:link href="http://developer.expressionz.in/blogs/category/user_interface_developers/javasscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://developer.expressionz.in/blogs</link>
	<description>User Interface : just another, but a serious developers weblog</description>
	<lastBuildDate>Thu, 20 May 2010 18:05:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>IS disabled=&#8221;true&#8221; and disabled=&#8221;false&#8221;  the same?</title>
		<link>http://developer.expressionz.in/blogs/2009/03/24/is-disabledtrue-and-disabledfalse-the-same/</link>
		<comments>http://developer.expressionz.in/blogs/2009/03/24/is-disabledtrue-and-disabledfalse-the-same/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 07:00:33 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[Form Elements]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=137</guid>
		<description><![CDATA[So is disabled="true" and disabled="false" same? 
<strong>Yes... here is some quick explanation...</strong>
"disabled" is an attribute of any form element/field and hence  can accept any value by its nature. So as long as this attribute is present, the element will be disabled regardless of its value]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2009%2F03%2F24%2Fis-disabledtrue-and-disabledfalse-the-same%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2009%2F03%2F24%2Fis-disabledtrue-and-disabledfalse-the-same%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Form+Elements" height="61" width="50" /><br />
			</a>
		</div>
<p>This ones old school , but as usual it is my memory supplement &#8230;<br />
<strong>So is disabled=&#8221;true&#8221; and disabled=&#8221;false&#8221; same?Yes</strong><br />
&#8230; Don&#8217;t believe, well! thats the way it is &#8230; here is some quick explanation&#8230;<br />
&#8220;disabled&#8221; is an attribute of any form element/field and hence  can accept any value by its nature.</p>
<blockquote><p>As long as this attribute is present, the element will be disabled regardless of its value. for eg.<br />
<em>&lt;input type=&#8221;text&#8221; value=&#8221;This is disabled&#8221; disabled&gt;<br />
&lt;input type=&#8221;text&#8221; value=&#8221;This is disabled&#8221; disabled=&#8221;disabled&#8221;&gt;<br />
&lt;input type=&#8221;text&#8221; value=&#8221;This is disabled&#8221; disabled=&#8221;true&#8221;&gt;<br />
&lt;input type=&#8221;text&#8221; value=&#8221;This is disabled&#8221; disabled=&#8221;false&#8221;&gt;</em></p>
<p>All of the above will make the this form field &#8220;DISABLED&#8221;.</p>
<p>Simply not providing the attribute &#8220;DISABLED&#8221; keeps the Field &#8220;ABLED&#8221; &#8230; like below</p>
<p><em>&lt;input type=&#8221;text&#8221; value=&#8221;This is not disabled&#8221; /&gt;</em></p></blockquote>
<p>Remember &#8220;<strong>Any value (or no value at all) of the disabled attribute, the browser will render it disabled</strong>&#8221; . To keep things clear in our minds W3C recommends that we use <strong>disabled=&#8221;disabled&#8221;</strong> in these situations.</p>
<blockquote><p>This is difference though when we use this attribute in javascript &#8230;<br />
<em><strong><br />
</strong>document.form.element.disabled = true; //the element will be disabled<br />
document.form.element.disabled = false; //the element will be enabled</em></p></blockquote>
<p>The above arguments are also true for these attributes and elements :<strong><br />
</strong></p>
<ul>
<li><strong> checked (radio button and checkbox)</strong></li>
<li><strong> selected (option)</strong></li>
<li><strong> nowrap (td) </strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2009/03/24/is-disabledtrue-and-disabledfalse-the-same/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calling Multiple Windows Onload Functions In Javascript</title>
		<link>http://developer.expressionz.in/blogs/2009/03/07/calling-multiple-windows-onload-functions-in-javascript/</link>
		<comments>http://developer.expressionz.in/blogs/2009/03/07/calling-multiple-windows-onload-functions-in-javascript/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 10:08:50 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[XSL]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=88</guid>
		<description><![CDATA[Heres another little piece of Javascript trickery that I had to dig around because the situation commanded it. In one of my web sites, I had this situation where I had to implement "windows.onload" twice. The first thing that would came to an inexpeienced mind like mine ( I  have to say that, since I have been using javascript Frameworks and libraries, I have forgotton to simple things on my own... sad but true), is the following method]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2009%2F03%2F07%2Fcalling-multiple-windows-onload-functions-in-javascript%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2009%2F03%2F07%2Fcalling-multiple-windows-onload-functions-in-javascript%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Tips+%26amp%3B+Tricks" height="61" width="50" /><br />
			</a>
		</div>
<p>Heres another little peice of Javascript trickery that I had to dig around because the situation commaned it. In one of my web sites, I had this situation where I had to implement &#8220;windows.onload&#8221; twice. The first thing that would came to an inexperienced mind like mine ( I  have to honestly say that, since I have been using  javascript Frameworks and libraries, I have forgotton to do simple things on my own&#8230; sad but true), is the  following method&#8230;</p>
<blockquote><pre class=""javascript"">
window.onload=onloadfn1;
window.onload=onloadfn2;
window.onload=onloadfn3;
etc...
</pre>
</blockquote>
<p>Sorry to say but, this wont work&#8230; dont want to discuss the execution science of Javascript much &#8230; but according to my recent experience, only the last function (onloadfn3) will ill actually get executed.</p>
<p>In normal situations, unlike mine (which I&#8217;ll talk about a little later)&#8230; you could do one of the following to execute mutliple onload functions &#8230;.</p>
<blockquote><p><strong>OR something like this</strong></p>
<pre class=""javascript"">
function doOnLoad() {
        onloadfn1();
        onloadfn2();
        onloadfn3();
}
window.onload = doOnLoad;
</pre>
</blockquote>
<p>For my current situation , I cannot use either  of the above&#8230;<br />
Why did I need to call windows.onload twice, rather that calling two functions within a single onload function? Here is quick look at my problem statement&#8230;</p>
<p><em>&#8220;My Site pages are  structured like the WORDPRESS theme&#8230;. i.e. there is a common Header.php and Footer.php that gets included into all the site pages. There is an onload function implementaion in the Footer.php to do some common onload functions. AND there are few pages that need to something of their own ONLOAD , apart from those done by the common onload function. If I assign callback function directly to the window.onload handler, it will over-ride previously assigned callbacks in the Footer.php&#8221;</em></p>
<p>&#8230;. Is my problem understood <img src='http://developer.expressionz.in/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ?</p>
<p>Well! there are few solutions that I did find. They all are very similar and mainly implementions of a solution given by Simon Willison  (<a href="http://simonwillison.net/2004/May/26/addLoadEvent/" target="_new">http://simonwillison.net/2004/May/26/addLoadEvent/</a>)&#8230;</p>
<p><strong>Solution :</strong></p>
<blockquote><p><strong>Simply add this javascript code to site &#8230;</strong></p>
<pre class="css">
function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != <span class="cssString">&#039;function&#039;</span>) {
       window.onload = func
    <span class="cssMedia">}</span> else {
       window.onload = function() {
           if (oldonload) {
                  oldonload()
          <span class="cssMedia">}</span>
          func()
       <span class="cssMedia">}</span>
   <span class="cssMedia">}</span>
<span class="cssMedia">}</span>
</pre>
<p>And call it instead of the usual &#8220;windows.onload&#8221;</p>
<pre class="css">
addLoadEvent(FunctionToRunOnPageLoad);
addLoadEvent(function() {
/* more code to run on page load *
<span class="cssMedia">}</span>); </pre>
</blockquote>
<p><strong>Advantages of this code snippet &#8230;</strong><br />
1.  Primarily, It lets you have multiple windows.onload events, called from seperate parts of your code,   without overridding the previous definition<br />
2. It is really unobtrusive. It can be placed in a file with your other scripts or in a separate file.<br />
3. It works even if window.onload has already been set.</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2009/03/07/calling-multiple-windows-onload-functions-in-javascript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Loading JavaScripts Dynamically</title>
		<link>http://developer.expressionz.in/blogs/2008/12/25/loading-javascripts-dynamically/</link>
		<comments>http://developer.expressionz.in/blogs/2008/12/25/loading-javascripts-dynamically/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 09:54:59 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=51</guid>
		<description><![CDATA[Sometimes to keep the pageweight down ... we have split our scripts into fragments...These javascript fragments can be loaded as and when required ( on an event or on click of a  link or button etc.).

]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F12%2F25%2Floading-javascripts-dynamically%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F12%2F25%2Floading-javascripts-dynamically%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Tips+%26amp%3B+Tricks" height="61" width="50" /><br />
			</a>
		</div>
<p>Sometimes to keep the pageweight down &#8230; we have split our scripts into fragments&#8230;These javascript fragments can be loaded as and when required ( on an event or on click of a  link or button etc.).</p>
<p>Loading Javascripts dynamically is simple and pretty straight forward  as below&#8230; </p>
<blockquote><p>&lt;<span class="start-tag">script</span><span class="attribute-name"> type</span>=<span class="attribute-value">&#8220;text/javascript&#8221;</span>&gt;<br />
function loadNewScript(source){<br />
  var s = document.createElement(&#8217;script&#8217;);<br />
  s.setAttribute(&#8216;type&#8217;,'text/javascript&#8217;);<br />
  s.setAttribute(&#8217;src&#8217;, source);<br />
  document.body.appendChild(s);<br />
}<br />
&lt;/<span class="end-tag">script</span>&gt;</p>
<p>and you can have the following call link anywhere in the body , or you can have this script &#8220;onLoad&#8221; of the document itself&#8230;</p>
<p>&lt;<span class="start-tag">a</span><span class="attribute-name"> href</span>=<span class="attribute-value">&#8220;javascript:loadNewScript(&#8216;myDynamicScript.js&#8217;);&#8221;</span>&gt;Load Dynamic Script&lt;/<span class="end-tag">a</span>&gt;</p>
<p>or</p>
<p>&lt;body onload=&#8221;loadNewScript(&#8216;myDynamicScript.js&#8217;);&#8221;&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/12/25/loading-javascripts-dynamically/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple, Lightweight, Cross Browser Lightbox for your webpage</title>
		<link>http://developer.expressionz.in/blogs/2008/10/03/simple-lightweight-cross-browser-lightbox-for-your-webpage/</link>
		<comments>http://developer.expressionz.in/blogs/2008/10/03/simple-lightweight-cross-browser-lightbox-for-your-webpage/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 10:38:47 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[UI Components]]></category>
		<category><![CDATA[Lightbox]]></category>
		<category><![CDATA[Modal Dialog Box]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=39</guid>
		<description><![CDATA[If your requirement is “<strong>BUT I WANT A SIMPLE AND LIGHTWEIGHT LIGHTBOX SCRIPT FOR MY SITE</strong>”, then here it is;]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F10%2F03%2Fsimple-lightweight-cross-browser-lightbox-for-your-webpage%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F10%2F03%2Fsimple-lightweight-cross-browser-lightbox-for-your-webpage%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Lightbox,Modal+Dialog+Box" height="61" width="50" /><br />
			</a>
		</div>
<p>Not that there are only a few LIGHTBOX&#8217;s that you can find when you google. The issue with most of the lightboxes that I found was that they all seemed to use one or the other heavy weight JAVASCRIPT frameworks like JQUERY, PROTOTYPE, MOOTOOLS and the likes. They are all cool and swanky looking. But If your requirement is “<strong>BUT I WANT A SIMPLE AND LIGHTWEIGHT LIGHTBOX SCRIPT FOR MY SITE</strong>”, then here it is;</p>
<p><strong>Some nice features of this lightbox</strong></p>
<ol>
<li>Very light<br />
a. 4kb of Scripts when packed (8 kb unpacked)<br />
b. 2 kb of CSS<br />
c. Few lines of HTML for the lightbox container</li>
<li>Simple to understand and implement</li>
<li>Can have multiple Lightboxes on the same page.</li>
<li>The same lightbox container is used to show, different content (which is separately included as hidden divisions in the page), depending on the link/option that is clicked.</li>
<li>Automatically centers itself, taking into consideration all factors such as, Window height and width (screen resolution), page scroll amount and the height of the contents of the lightbox</li>
<li>Tested in IE 7 &amp; FF</li>
</ol>
<p><strong><a title="View Lightbox demo" href="http://developer.expressionz.in/downloads/simple_lightbox_using_JO/Lightweight-Crossbrowser_Lightbox.html" target="_blank">View Demo</a> |<br />
<a title="download lightbox source" href="http://developer.expressionz.in/blogs/wp-content/plugins/download-monitor/download.php?id=3" target="_blank">Download Lightbox Source Zip (Downloaded 1040 times)</a></strong></p>
<hr /><strong>Using the Lightbox[Files in the zip file]</strong></p>
<p><em><strong>jo.js , jo_pack.js[packed version] </strong></em>:- a simple set of JAVASCRIPT OBJECTS [JO], which contains element, window and document positioning scripts. You can open JO.JS if you wish to get your hands dirty with some Advanced Javascripting, creating abstract functions, extending element properties and such. If you not too much in Javascripting , Leave it alone.</p>
<p><em><strong>lightbox.js, lightbox_pack.js[packed version]</strong></em>:- Contain light box manager scripts. If you are page designer , also responsible with implementing the lightbox on the page, you need to understand the LightBoxManager . LightBoxManager basically contains just two functions showLightBox and closeLightBox.</p>
<p><em><strong>lightbox.css </strong></em>:- If you know CSS , you can play around with lightbox.css to customize the look-n-feel lightbox.css</p>
<p><em><strong>index.html</strong></em>: Sample implementation of the lightbox with two different content</p>
<p><em><strong>lb_underlay_bkg.png</strong></em> :- This is light/simi transparent image that is used the background for the lightbox underlay [Underlay is the layer below the lighbox, which prevents the user from clicking any other entity on the page, while the lightbox is open]. You can use any image or even a solid color for this purpose, depending upon the page design and the requirement.</p>
<p><em><strong>icon_lb_close.gif </strong></em>: &#8211; The image for close lightbox handle on the top right of the light box. Can use any image as per design</p>
<p><strong><a title="View Lightbox demo" href="http://developer.expressionz.in/downloads/simple_lightbox_using_JO/Lightweight-Crossbrowser_Lightbox.html" target="_blank">View Demo</a> |<br />
<a title="download lightbox source" href="http://developer.expressionz.in/blogs/wp-content/plugins/download-monitor/download.php?id=3" target="_blank">Download Lightbox Source Zip (Downloaded 1040 times)</a></strong></p>
<p><strong>Please let us have your comments and feedback &#8230; </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/10/03/simple-lightweight-cross-browser-lightbox-for-your-webpage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript: Edit web page in browser</title>
		<link>http://developer.expressionz.in/blogs/2008/09/13/javascript-edit-web-page-in-browser/</link>
		<comments>http://developer.expressionz.in/blogs/2008/09/13/javascript-edit-web-page-in-browser/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 06:19:46 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=35</guid>
		<description><![CDATA[
			
				
			
		
Well , I must say, not such an usefull piece of science, but if you are a Web Developer, might come handy , someday ( or will it?). Here is small bookmarklet, which allows to edit the web page for any site .
And Sorry!  You can save the results on your local machine only.
javascript:document.body.contentEditable=&#8217;true&#8217;; document.designMode=&#8217;on&#8217;; [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F09%2F13%2Fjavascript-edit-web-page-in-browser%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F09%2F13%2Fjavascript-edit-web-page-in-browser%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Javascript" height="61" width="50" /><br />
			</a>
		</div>
<p>Well , I must say, not such an usefull piece of science, but if you are a Web Developer, might come handy , someday ( or will it?). Here is small bookmarklet, which allows to edit the web page for any site .<br />
And Sorry!  You can save the results on your local machine only.</p>
<blockquote><p>javascript:document.body.contentEditable=&#8217;true&#8217;; document.designMode=&#8217;on&#8217;; void 0</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/09/13/javascript-edit-web-page-in-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS hack: Javascript, CSS, HTML  for Firefox only</title>
		<link>http://developer.expressionz.in/blogs/2008/09/02/css-hack-javascript-css-html-for-firefox-only/</link>
		<comments>http://developer.expressionz.in/blogs/2008/09/02/css-hack-javascript-css-html-for-firefox-only/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 08:17:33 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Browser Quirks]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[FF Bugs]]></category>
		<category><![CDATA[FF Hacks]]></category>
		<category><![CDATA[FF Issues]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=31</guid>
		<description><![CDATA[If you are stuck badly or as such, have no-regards for validation (sometime we have to be cruel),  you could use the following to declare a link to a FF only stylesheet or even just code the CSS within this block. The code is 

<comment> Put your ff only HTML/CSS/Scripts here </comment>
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F09%2F02%2Fcss-hack-javascript-css-html-for-firefox-only%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F09%2F02%2Fcss-hack-javascript-css-html-for-firefox-only%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=FF+Bugs,FF+Hacks,FF+Issues" height="61" width="50" /><br />
			</a>
		</div>
<p>Many a times we feel the need to write browser specfic hacks (though it is not a good practice, we UI developers have to resort to such evils until the great Browsers Wars comes to a truce). Earlier , I had mentioned in this article <strong><a href="http://developer.expressionz.in/blogs/?p=7">For your IEs Only</a></strong>, how to write a CSS snippet that would be visible to IE browsers &lt; IE7 only.</p>
<p>Yesterday, I had a case, where I wanted to write some FireFox specific CSS snippets. Well! I am not sure if there is a CSS code for this but there is a HTML. <strong>THERE IS A CATCH THOUGH</strong>, this piece of HTML doesnot pass HTML validation. But , anywaz! If you are stuck badly or as such, have no-regards for validation (sometime we have to be cruel), you could use the following to declare a link to a FF only stylesheet or even just code the CSS within this block. The code is</p>
<blockquote><p>&lt;comment&gt; Put your FireFox only HTML/CSS/Scripts here &lt;/comment&gt;</p>
<p><strong>e.g.</strong><br />
    &lt;comment&gt;<br />
         &lt;style&gt;<br />
             /* Styles for FF only  */<br />
             fieldset{border:1px solid #dddddd;}<br />
          &lt;/style&gt;<br />
     &lt;/comment&gt;</p></blockquote>
<p>I&#8221;m happy for the moment &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/09/02/css-hack-javascript-css-html-for-firefox-only/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove specific item from a javascript array that matches a passed string</title>
		<link>http://developer.expressionz.in/blogs/2008/09/01/javascript-array-remove-specifc-item/</link>
		<comments>http://developer.expressionz.in/blogs/2008/09/01/javascript-array-remove-specifc-item/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 11:18:32 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[UI Developer]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[String Trim]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=32</guid>
		<description><![CDATA[
			
				
			
		
Here&#8217;s quick way of extending the native Javascript Array Object, just to do that&#8230;
Array.prototype.removeItem=function(str) {
   for(i=0; i&#60;this.length ; i++){
     if(escape(this[i]).match(escape(str.trim()))){
       this.splice(i, 1);  break;
     }
   }
  return this;
}

So now you can do something like this&#8230;
var animals= new Array("dog","lion","cat","tiger","elephant");
animals.removeItem('tiger');
Now the animals array will contain &#8220;dog&#8221;,&#8221;lion&#8221;,&#8221;cat&#8221;,&#8221;elephant&#8221;;
 PS: And here is the String Trim Prototype too &#8230;
String.prototype.trim=function(str) {
  [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F09%2F01%2Fjavascript-array-remove-specifc-item%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F09%2F01%2Fjavascript-array-remove-specifc-item%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Array,Prototype,String+Trim" height="61" width="50" /><br />
			</a>
		</div>
<p>Here&#8217;s quick way of extending the native Javascript Array Object, just to do that&#8230;</p>
<blockquote><p><code>Array.prototype.<strong>removeItem</strong>=function(str) {<br />
   for(i=0; i&lt;this.length ; i++){<br />
     if(escape(this[i]).match(escape(str.trim()))){<br />
       this.splice(i, 1);  break;<br />
     }<br />
   }<br />
  return this;<br />
}<br />
</code></p></blockquote>
<p>So now you can do something like this&#8230;</p>
<blockquote><p><code>var animals= new Array("dog","lion","cat","tiger","elephant");<br />
animals.<code>removeItem</code>('tiger');</code></p>
<p>Now the animals array will contain &#8220;dog&#8221;,&#8221;lion&#8221;,&#8221;cat&#8221;,&#8221;elephant&#8221;;</p></blockquote>
<p> PS: And here is the String Trim Prototype too &#8230;</p>
<blockquote><p><code>String.prototype.trim=function(str) {<br />
  str = this != window? this : str;<br />
  return str.replace(/^\s+/g, '').replace(/\s+$/g, '');<br />
}</code></p></blockquote>
<p> <br />
Enjoy&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/09/01/javascript-array-remove-specifc-item/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Practices: Working with JavaScript’s</title>
		<link>http://developer.expressionz.in/blogs/2008/05/15/best-practices-working-with-javascript%e2%80%99s/</link>
		<comments>http://developer.expressionz.in/blogs/2008/05/15/best-practices-working-with-javascript%e2%80%99s/#comments</comments>
		<pubDate>Thu, 15 May 2008 19:47:28 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[User Interface Desgin]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=20</guid>
		<description><![CDATA[
			
				
			
		
Include JavaScript’s at the Bottom of the HTML Document
If you do not have document.write ( or any dynamic generation of page contents using javascripts) to insert part of the page&#8217;s content in your scripts, move the script include statement to the bottom of the page, before the end of the BODY tag.
The HTTP/1.1 specification suggests [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F05%2F15%2Fbest-practices-working-with-javascript%25e2%2580%2599s%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F05%2F15%2Fbest-practices-working-with-javascript%25e2%2580%2599s%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Best+Practices,Javascript" height="61" width="50" /><br />
			</a>
		</div>
<h4>Include JavaScript’s at the Bottom of the HTML Document</h4>
<p>If you do not have document.write ( or any dynamic generation of page contents using javascripts) to insert part of the page&#8217;s content in your scripts, move the script include statement to the bottom of the page, before the end of the BODY tag.<br />
The HTTP/1.1 specification suggests that browsers download no more than two components in parallel per hostname. If you serve your images from multiple hostnames, you can get more than two downloads to occur in parallel. While a script is downloading, however, the browser won&#8217;t start any other downloads, even on different hostnames.<br />
There are also ways to dynamically create SCRIPT nodes and load remote scripts after the page is loaded using AJAX .</p>
<h4>Externalise you JavaScript’s</h4>
<p>Using external JavaScript files will result in faster loading of  pages because the JavaScript files are cached by the browser. Inline JavaScript’s’ in HTML documents get downloaded every time the HTML document is requested. This might actually reduce the number of HTTP requests made but it subsequently increases the size of the HTML document. External JavaScript’s are cached by the browser; the size of the HTML document is reduced without increasing the number of HTTP requests.<br />
Please note that, if users on your site have multiple page views per session and many of your pages re-use the same scripts and stylesheets, there is a greater potential benefit from cached external files.</p>
<h4>Pack Your Javascript Files</h4>
<p>In case of JavaScripts , unlike CSS, the files could crunched using some standard algorithms that would give a reduced file size than simply removing spaces or tabs. An example of javascript packer can be found here http://dean.edwards.name/packer/</p>
<h4>Get rid of any Duplicate Scripts</h4>
<p>It is very unusual that entire scripts might be duplicated, but a review of the ten top U.S. web sites shows that two of them contain a duplicated script. Duplicate scripts  but obviously reduces the performance by creating unnecessary HTTP requests and wasted JavaScript execution.<br />
Also, in many instances, though the scripts names are different, there is a likelihood of duplicate scripts within the same page due to team size and number of scripts.</p>
<h4>Minimize accessing DOM elements where possible</h4>
<p>Accessing DOM elements with JavaScript is slow so in order to have a more responsive page, you should:<br />
•	Cache references to accessed elements<br />
•	Update nodes &#8220;offline&#8221; and then add them to the tree<br />
•	Avoid fixing layout with JavaScript</p>
<h4>Separate Behavior from Content and Presentation</h4>
<p>Just as we separate Presentation (CSS/XSLT) from Content (XHTML/XML), we should also separate Behavior (Javascript). This is called unobtrusive Javascript. Just as we link to external CSS files, we should link to external javascript files.</p>
<p>Instead of hard coding behavior into the content (e.g. onmouseover, onclick, etc.), behavior should be dynamically added to elements, classes, and unique elements (IDs) using the DOM. The foundational document, the content, should contain only valid XHTML/XML and no javascript.<br />
Javascript should augment content by adding behavior. The content should remain useful and usable without javascript (or without full javascript support).</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/05/15/best-practices-working-with-javascript%e2%80%99s/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Irritating Select Boxes Visible Through the Popup Divisions</title>
		<link>http://developer.expressionz.in/blogs/2008/03/15/irritating-select-boxes-visible-through-the-popup-divisions/</link>
		<comments>http://developer.expressionz.in/blogs/2008/03/15/irritating-select-boxes-visible-through-the-popup-divisions/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 11:26:26 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Browser Quirks]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[IE Bugs]]></category>
		<category><![CDATA[IE Fixes]]></category>
		<category><![CDATA[IE Hacks]]></category>
		<category><![CDATA[IE Issues]]></category>
		<category><![CDATA[IE6]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=49</guid>
		<description><![CDATA[
			
				
			
		
At several occasions, while doing  page layouts with popup divisions/ lightboxes/ Tips etc  we come across situations where  some Form SELECT  objects happens to be under these POPUP Divisions , by design and it shows through&#8230;. YUK!!!
Well! you could easily FIX this by adjusting your Z-INDEX values appropriately for FF and IE7 . But Good [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F03%2F15%2Firritating-select-boxes-visible-through-the-popup-divisions%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F03%2F15%2Firritating-select-boxes-visible-through-the-popup-divisions%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=IE+Bugs,IE+Fixes,IE+Hacks,IE+Issues,IE6" height="61" width="50" /><br />
			</a>
		</div>
<p>At several occasions, while doing  page layouts with popup divisions/ lightboxes/ Tips etc  we come across situations where  some Form SELECT  objects happens to be under these POPUP Divisions , by design and it shows through&#8230;. YUK!!!</p>
<p>Well! you could easily FIX this by adjusting your Z-INDEX values appropriately for FF and IE7 . But Good Old ( pun intended) IE6  doesn&#8217;t  behave as intended&#8230;. The SELECT BOX show through , even after you apply some drastically high  Z-INDEX values to your PopUp Division&#8230; Bummer!!!!</p>
<p>There are NO FIXES for this problem , but there are , I believe,  more than a few way to work-around this problem , But Im here to tell you the simplest solution that I use, which works fine for me, in most of the cases &#8230;.</p>
<blockquote><p><strong>&#8220;HIDE THE ROUGE SELECT BOX WHEN YOU SHOW THE POPUP</strong>&#8221;</p>
<p>Simply in your script snippet where you show your popup, add a piece of script to set the visibility of the SELECT Box to &#8220;Hidden&#8221;</p>
<p><em>document.getElementById(&#8216;my_select&#8217;).style.visibilty = &#8220;hidden&#8221;;</em></p>
<p>And remember to set it back on CLOSE of your PopUp Division</p>
<p><em>document.getElementById(&#8216;my_select&#8217;).style.visibilty = &#8220;visible&#8221;;<br />
</em></p>
<p>where &#8220;my_select&#8221; is the ID of the irritation SELECT Box</p></blockquote>
<p>Hope this helps&#8230;</p>
<p>PS. There are ofcourse other options like dynamically positionining an IFRAME ( same size as you PopUp) under the Popup DIV &#8230; This works well too , but with an addition of loads of DOM Elements, SCRIPTS and Headache . I have used this solution too, and  If you do need any help with this option, do let me know. Will be glad to help!</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/03/15/irritating-select-boxes-visible-through-the-popup-divisions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conditional Comments : For your IEs Only -Part Duex</title>
		<link>http://developer.expressionz.in/blogs/2008/01/08/conditional-comments-for-your-ies-only-part-duex/</link>
		<comments>http://developer.expressionz.in/blogs/2008/01/08/conditional-comments-for-your-ies-only-part-duex/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 05:50:40 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[Browser Quirks]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[IE Bugs]]></category>
		<category><![CDATA[IE Fixes]]></category>
		<category><![CDATA[IE Hacks]]></category>
		<category><![CDATA[IE Issues]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=11</guid>
		<description><![CDATA[Conditional Comments is a way to detect the browser type and version. Browser detection is performed to ensure that the content presented to the browser specific. Browser detection can be done using many different techniques.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F01%2F08%2Fconditional-comments-for-your-ies-only-part-duex%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2008%2F01%2F08%2Fconditional-comments-for-your-ies-only-part-duex%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=IE+Bugs,IE+Fixes,IE+Hacks,IE+Issues" height="61" width="50" /><br />
			</a>
		</div>
<p>A few months earlier we saw , how we could include a piece of CSS that would be visible to IE6 only(<a href="http://developer.expressionz.in/blogs/?p=7">For your IEs Only </a>). There are other ways to achieve this as well. Simply include a separate CSS, specific to your target IE. this could be achieved with what is called as Conditional Comments.</p>
<p>Conditional Comments is a way to detect the browser type and version. Browser detection is performed to ensure that the content presented to the browser specific. Browser detection can be done using many different techniques. This method has several advantages over earlier methods, that included style switching using javascript. To list important few, would be;</p>
<ul>
<li>Scripting is not required</li>
<li>Cross-browser</li>
</ul>
<p><strong>How do we do this?</strong></p>
<blockquote><p>Do something in IE 5 only<br />
<strong><code>&lt;!--[if IE 5]&gt; Welcome to Internet Explorer 5. &lt;![endif]--&gt;</code></strong></p></blockquote>
<blockquote><p>Do something in All IE versions<code><strong><br />
&lt;!--[if IE]&gt;<br />
&lt;link href="css/ie.css" rel="Stylesheet" type="text/css" /&gt;<br />
&lt;![endif]--&gt;</strong></code></p></blockquote>
<blockquote><p>Do something in All IE versions newer that IE 5<br />
<strong><code>&lt;!--[if gte IE 5]&gt;<br />
&lt;script type="text/javascript"&gt;&lt;!--<br />
alert("Congratulations! You are running Internet Explorer 5 or greater.");&lt;br /&gt;<br />
// --&gt;&lt;/script&gt;<br />
&lt;![endif]--&gt;</code></strong></p></blockquote>
<p>For more conditional vartiations , read this info on MSDN :<br />
<a href="http://msdn.microsoft.com/en-us/library/ms537512.aspx">About Conditional Comment</a></p>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2008/01/08/conditional-comments-for-your-ies-only-part-duex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
