<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Arun P Johny's Blog</title>
	<atom:link href="http://arunpjohny.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://arunpjohny.wordpress.com</link>
	<description>Arun P Johny's Blog</description>
	<lastBuildDate>Sat, 04 Apr 2009 13:44:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='arunpjohny.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Arun P Johny's Blog</title>
		<link>http://arunpjohny.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://arunpjohny.wordpress.com/osd.xml" title="Arun P Johny&#039;s Blog" />
	<atom:link rel='hub' href='http://arunpjohny.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Adding and Removing Options from Select box</title>
		<link>http://arunpjohny.wordpress.com/2009/04/04/adding-and-removing-options-from-select-box/</link>
		<comments>http://arunpjohny.wordpress.com/2009/04/04/adding-and-removing-options-from-select-box/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 13:44:09 +0000</pubDate>
		<dc:creator>Arun P Johny</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://arunpjohny.wordpress.com/?p=34</guid>
		<description><![CDATA[Adding options to a select element in html using dynamic javascript function addOption(selectbox, value, text){     var optn = new Option();     optn.text = text;     optn.value = value;     selectbox.options.add(optn); } We can add new options to a select element using the options array present in the select object. We can create a new [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arunpjohny.wordpress.com&amp;blog=5771693&amp;post=34&amp;subd=arunpjohny&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Adding options to a select element in html using dynamic javascript</p>
<div style="background-color:#CCCCCC;margin-left:20px;">function addOption(selectbox, value, text){<br />
    var optn = new Option();<br />
    optn.text = text;<br />
    optn.value = value;<br />
    selectbox.options.add(optn);<br />
}</div>
<p>We can add new options to a select element using the options array present in the select object. We can create a new option using the new operator and Option class provided by javascript or by using document.createElement(&#8220;OPTION&#8221;);</p>
<p>Removing all options from a select box</p>
<div style="background-color:#CCCCCC;margin-left:20px;">function removeAllOptions(selectbox){<br />
    if(selectbox &amp;&amp; selectbox.options &amp;&amp; selectbox.options.length &gt; 0){<br />
        while(selectbox.options.length &gt; 0){<br />
            selectbox.remove(0);<br />
        }<br />
    }<br />
}</div>
<p>To remove a option from select element we can use the remove method in the select object. It takes the index of the option to be removed as an argument.</p>
<p> </p>
<p>Here is a sample html snippet which uses select element and addition and removal of options using javascript</p>
<div style="background-color:#CCCCCC;margin-left:20px;">&lt;html&gt;  <br />
    &lt;body&gt;<br />
        Select Box 1: &lt;select id=&#8221;selectbox1&#8243;&gt;&lt;/select&gt;<br />
        &lt;br /&gt;<br />
        &lt;input type=&#8221;button&#8221; onclick=&#8221;clearSelectBox(&#8216;selectbox1&#8242;)&#8221; value=&#8221;Remove&#8221; /&gt;<br />
        &lt;input type=&#8221;button&#8221; onclick=&#8221;addItems(&#8216;selectbox1&#8242;)&#8221; value=&#8221;Add&#8221; /&gt;<br />
    &lt;/body&gt;<br />
<span> </span><br />
    &lt;script&gt;<br />
        function removeAllOptions(selectbox){<br />
            if(selectbox &amp;&amp; selectbox.options &amp;&amp; selectbox.options.length &gt; 0){<br />
                while(selectbox.options.length &gt; 0){</div>
<div style="background-color:#CCCCCC;margin-left:20px;">                    selectbox.remove(0);</div>
<div style="background-color:#CCCCCC;margin-left:20px;">                }</div>
<div style="background-color:#CCCCCC;margin-left:20px;">            }</div>
<div style="background-color:#CCCCCC;margin-left:20px;">        }<br />
<span> </span><br />
        function addOption(selectbox, value, text){<br />
            var optn = new Option();<br />
            optn.text = text;<br />
            optn.value = value;<br />
            selectbox.options.add(optn);<br />
        }<br />
<span> </span><br />
        function clearSelectBox(selectBoxId){<br />
            var selectbox = document.getElementById(selectBoxId);<br />
            removeAllOptions(selectbox);<br />
        }<br />
<span> </span><br />
        function addItems(selectBoxId){<br />
            var selectbox = document.getElementById(selectBoxId);<br />
            addOption(selectbox, 1, &#8216;One&#8217;);<br />
            addOption(selectbox, 2, &#8216;Two&#8217;);<br />
            addOption(selectbox, 3, &#8216;Three&#8217;);<br />
            addOption(selectbox, 4, &#8216;Four&#8217;);<br />
            addOption(selectbox, 5, &#8216;Five&#8217;);<br />
            addOption(selectbox, 6, &#8216;Six&#8217;);<br />
        }<br />
<span> </span><br />
        window.onload = addItems(&#8216;selectbox1&#8242;)<br />
    &lt;/script&gt;<br />
&lt;/html&gt;</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arunpjohny.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arunpjohny.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arunpjohny.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arunpjohny.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arunpjohny.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arunpjohny.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arunpjohny.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arunpjohny.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arunpjohny.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arunpjohny.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arunpjohny.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arunpjohny.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arunpjohny.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arunpjohny.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arunpjohny.wordpress.com&amp;blog=5771693&amp;post=34&amp;subd=arunpjohny&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arunpjohny.wordpress.com/2009/04/04/adding-and-removing-options-from-select-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4687f5664163d2ccfc19892bf9489211?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Arun</media:title>
		</media:content>
	</item>
		<item>
		<title>Enable GC dumb in JVM</title>
		<link>http://arunpjohny.wordpress.com/2009/03/12/enable-gc-dumb-in-jvm/</link>
		<comments>http://arunpjohny.wordpress.com/2009/03/12/enable-gc-dumb-in-jvm/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 03:28:31 +0000</pubDate>
		<dc:creator>Arun P Johny</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[memory leak]]></category>

		<guid isPermaLink="false">http://arunpjohny.wordpress.com/?p=29</guid>
		<description><![CDATA[-verbose:gc — prints basic information about GC to the standard output -XX:+PrintGCTimeStamps — prints the times that GC executes -XX:+PrintGCDetails — prints statistics about different regions of memory in the JVM -Xloggc:&#60;file&#62; — logs the results of GC in the given file<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arunpjohny.wordpress.com&amp;blog=5771693&amp;post=29&amp;subd=arunpjohny&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>-verbose:gc — prints basic information about GC to the standard output<br />
-XX:+PrintGCTimeStamps — prints the times that GC executes<br />
-XX:+PrintGCDetails — prints statistics about different regions of memory in the JVM<br />
-Xloggc:&lt;file&gt; — logs the results of GC in the given file</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arunpjohny.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arunpjohny.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arunpjohny.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arunpjohny.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arunpjohny.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arunpjohny.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arunpjohny.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arunpjohny.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arunpjohny.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arunpjohny.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arunpjohny.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arunpjohny.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arunpjohny.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arunpjohny.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arunpjohny.wordpress.com&amp;blog=5771693&amp;post=29&amp;subd=arunpjohny&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arunpjohny.wordpress.com/2009/03/12/enable-gc-dumb-in-jvm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4687f5664163d2ccfc19892bf9489211?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Arun</media:title>
		</media:content>
	</item>
		<item>
		<title>Enable Jconsole In Tomcat</title>
		<link>http://arunpjohny.wordpress.com/2009/03/12/enable-jconsole-in-tomcat/</link>
		<comments>http://arunpjohny.wordpress.com/2009/03/12/enable-jconsole-in-tomcat/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 03:22:54 +0000</pubDate>
		<dc:creator>Arun P Johny</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[jvm]]></category>

		<guid isPermaLink="false">http://arunpjohny.wordpress.com/?p=26</guid>
		<description><![CDATA[Add the following properties to JVM settings -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=&#60;port_number&#62; -Dcom.sun.management.jmxremote &#60;port_number&#62; can be anything like 5000<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arunpjohny.wordpress.com&amp;blog=5771693&amp;post=26&amp;subd=arunpjohny&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Add the following properties to JVM settings</p>
<p>-Dcom.sun.management.jmxremote.ssl=false<br />
-Dcom.sun.management.jmxremote.authenticate=false<br />
-Dcom.sun.management.jmxremote.port=&lt;port_number&gt;<br />
-Dcom.sun.management.jmxremote</p>
<p>&lt;port_number&gt; can be anything like 5000</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arunpjohny.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arunpjohny.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arunpjohny.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arunpjohny.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arunpjohny.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arunpjohny.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arunpjohny.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arunpjohny.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arunpjohny.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arunpjohny.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arunpjohny.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arunpjohny.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arunpjohny.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arunpjohny.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arunpjohny.wordpress.com&amp;blog=5771693&amp;post=26&amp;subd=arunpjohny&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arunpjohny.wordpress.com/2009/03/12/enable-jconsole-in-tomcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4687f5664163d2ccfc19892bf9489211?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Arun</media:title>
		</media:content>
	</item>
		<item>
		<title>Retaining scroll position after store load</title>
		<link>http://arunpjohny.wordpress.com/2009/02/23/retaining-scroll-position-after-store-load/</link>
		<comments>http://arunpjohny.wordpress.com/2009/02/23/retaining-scroll-position-after-store-load/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 02:55:29 +0000</pubDate>
		<dc:creator>Arun P Johny</dc:creator>
				<category><![CDATA[extjs]]></category>

		<guid isPermaLink="false">http://arunpjohny.wordpress.com/2009/02/23/retaining-scroll-position-after-store-load/</guid>
		<description><![CDATA[view config: onLoad: Ext.emptyFn, listeners: { beforerefresh: function(v) { v.scrollTop = v.scroller.dom.scrollTop; }, refresh: function(v) { v.scroller.dom.scrollTop = v.scrollTop; }, }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arunpjohny.wordpress.com&amp;blog=5771693&amp;post=14&amp;subd=arunpjohny&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>view config:<br />
onLoad: Ext.emptyFn,<br />
listeners: {<br />
beforerefresh: function(v) {<br />
v.scrollTop = v.scroller.dom.scrollTop;<br />
},<br />
refresh: function(v) {<br />
v.scroller.dom.scrollTop = v.scrollTop;<br />
},</p>
<p>}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arunpjohny.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arunpjohny.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arunpjohny.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arunpjohny.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arunpjohny.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arunpjohny.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arunpjohny.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arunpjohny.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arunpjohny.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arunpjohny.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arunpjohny.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arunpjohny.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arunpjohny.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arunpjohny.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arunpjohny.wordpress.com&amp;blog=5771693&amp;post=14&amp;subd=arunpjohny&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arunpjohny.wordpress.com/2009/02/23/retaining-scroll-position-after-store-load/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4687f5664163d2ccfc19892bf9489211?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Arun</media:title>
		</media:content>
	</item>
	</channel>
</rss>
