<?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:blogger='http://schemas.google.com/blogger/2008' 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-39936788417190182</id><updated>2024-11-05T19:11:42.909-08:00</updated><category term="Javascript"/><category term="Checkbox"/><category term="Tabs in html"/><category term="Select tag"/><category term="Slideshows"/><category term="Text Box"/><category term="Calender"/><category term="Date checker in javascript"/><category term="Fixed header"/><category term="Fixed header and footer"/><category term="Image Slideshow"/><category term="Image galleries"/><category term="Javascript Image validation"/><category term="Javascript compare dates"/><category term="Javascript date"/><category term="Javascript date check"/><category term="Javascript disable right click"/><category term="Menu list"/><category term="Radio button"/><category term="header with no scroling"/><category term="javascript Image extension validation"/><category term="javascript check date"/><category term="javascript popup window"/><category term="open new window in javascript"/><category term="scrolling"/><category term="show web page content when scrolling comes"/><category term="window.open"/><title type='text'>JavaScript made simple</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default?start-index=26&amp;max-results=25'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>46</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-5130296791806995140</id><published>2009-09-25T02:25:00.000-07:00</published><updated>2009-09-25T02:38:09.682-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript popup window"/><category scheme="http://www.blogger.com/atom/ns#" term="open new window in javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="window.open"/><title type='text'>Javascript open new window</title><content type='html'>To open a new window by using javascript we need to use window.open method. We can customize the window.open method as per the requirement.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Syntax:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;window.open([URL], [Window Name], [Feature List], [Replace]);&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Simple Example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#60a href=&quot;javascript:%20void(0)&quot; onclick=&quot;window.open(&#39;popup.html&#39;,  &#39;windowname1&#39;,  &#39;width=200, height=77&#39;);   return false;&quot;&amp;#62Click here for simple popup window&amp;#60/a&amp;#62&lt;br /&gt;&lt;br /&gt;This is a simple window.open method with minimum features included.&lt;br /&gt;&lt;br /&gt;The features supported by the window.open method is:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Width&lt;/span&gt; --- Auto ---   specifies width of the new window in pixels&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;height&lt;/span&gt; --- Auto ---   height of the window in pixels&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;top&lt;/span&gt; --- Auto ---   specifies window position&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;left&lt;/span&gt; --- Auto ---   specifies window position&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;directories&lt;/span&gt; --- no---  should the directories bar be shown? (Links bar)&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;location&lt;/span&gt; --- no---     specifies the presence of the location bar&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;resizable&lt;/span&gt; --- no---   specifies whether the window can be resized.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;menubar&lt;/span&gt; --- no---   specifies the presence of the menu bar&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;toolbar&lt;/span&gt; --- no---   specifies the presence of the toolbar&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;scrollbars&lt;/span&gt; --- no---   specifies the presence of the scrollbars&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;status&lt;/span&gt; --- no---   specifies the presence of the statusbar&lt;br /&gt;&lt;br /&gt;Example when added the above features is:&lt;br /&gt;&lt;br /&gt;&amp;#60a href=&quot;javascript: void(0)&quot; &lt;br /&gt;   onclick=&quot;window.open(&#39;popup.html&#39;, &lt;br /&gt;  &#39;windowname2&#39;, &lt;br /&gt;  &#39;width=200, \&lt;br /&gt;   height=77, \&lt;br /&gt;   directories=no, \&lt;br /&gt;   location=no, \&lt;br /&gt;   menubar=no, \&lt;br /&gt;   resizable=no, \&lt;br /&gt;   scrollbars=1, \&lt;br /&gt;   status=no, \&lt;br /&gt;   toolbar=no&#39;); &lt;br /&gt;  return false;&quot;&amp;#62Click here for specific popup window&amp;#60/a&amp;#62</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/5130296791806995140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/09/javascript-open-new-window.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/5130296791806995140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/5130296791806995140'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/09/javascript-open-new-window.html' title='Javascript open new window'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-5122295410888919139</id><published>2009-08-20T05:25:00.000-07:00</published><updated>2009-08-20T05:31:06.324-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Date checker in javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript check date"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript date"/><title type='text'>Check the Date</title><content type='html'>The below script provides to how to check the entered date is the correct date or not like by selecting the april if we select 31 days it has to prompt the entered date is the invalid date. Such type of scenarios can be tested with the below javascript.&lt;br /&gt;&lt;br /&gt;var mth = new Array(&#39; &#39;,&#39;january&#39;,&#39;february&#39;,&#39;march&#39;,&#39;april&#39;,&#39;may&#39;,&#39;june&#39;,&#39;july&#39;,&#39;august&#39;,&#39;september&#39;,&#39;october&#39;,&#39;november&#39;,&#39;december&#39;);&lt;br /&gt;var day = new Array(31,28,31,30,31,30,31,31,30,31,30,31);&lt;br /&gt;&lt;br /&gt;function validateDate(fld,fmt,rng) {&lt;br /&gt;    var dd, mm, yy;var today = new Date;var t = new Date;fld = stripBlanks(fld);&lt;br /&gt;    if (fld == &#39;&#39;) return false;var d1 = fld.split(&#39;\/&#39;);&lt;br /&gt;    if (d1.length != 3) d1 = fld.split(&#39; &#39;);&lt;br /&gt;    if (d1.length != 3) return false;&lt;br /&gt;    if (fmt == &#39;u&#39; || fmt == &#39;U&#39;) {&lt;br /&gt;        dd = d1[1]; mm = d1[0]; yy = d1[2];&lt;br /&gt;    }&lt;br /&gt;    else if (fmt == &#39;j&#39; || fmt == &#39;J&#39;) {&lt;br /&gt;        dd = d1[2]; mm = d1[1]; yy = d1[0];&lt;br /&gt;    }&lt;br /&gt;    else if (fmt == &#39;w&#39; || fmt == &#39;W&#39;){&lt;br /&gt;        dd = d1[0]; mm = d1[1]; yy = d1[2];&lt;br /&gt;    }&lt;br /&gt;    else return false;&lt;br /&gt;    var n = dd.lastIndexOf(&#39;st&#39;);&lt;br /&gt;    if (n &gt; -1) dd = dd.substr(0,n);&lt;br /&gt;    n = dd.lastIndexOf(&#39;nd&#39;);&lt;br /&gt;    if (n &gt; -1) dd = dd.substr(0,n);&lt;br /&gt;    n = dd.lastIndexOf(&#39;rd&#39;);&lt;br /&gt;    if (n &gt; -1) dd = dd.substr(0,n);&lt;br /&gt;    n = dd.lastIndexOf(&#39;th&#39;);&lt;br /&gt;    if (n &gt; -1) dd = dd.substr(0,n);&lt;br /&gt;    n = dd.lastIndexOf(&#39;,&#39;);&lt;br /&gt;    if (n &gt; -1) dd = dd.substr(0,n);&lt;br /&gt;    n = mm.lastIndexOf(&#39;,&#39;);&lt;br /&gt;    if (n &gt; -1) mm = mm.substr(0,n);&lt;br /&gt;    if (!isNumber(dd)) return false;&lt;br /&gt;    if (!isNumber(yy)) return false;&lt;br /&gt;    if (!isNumber(mm)) {&lt;br /&gt;        var nn = mm.toLowerCase();&lt;br /&gt;        for (var i=1; i &lt; 13; i++) {&lt;br /&gt;            if (nn == mth[i] ||&lt;br /&gt;                nn == mth[i].substr(0,3)) {&lt;br /&gt;                mm = i; i = 13;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    if (!isNumber(mm)) return false;&lt;br /&gt;    dd = parseFloat(dd); mm = parseFloat(mm); yy = parseFloat(yy);&lt;br /&gt;    if (yy &lt; 100) yy += 2000;&lt;br /&gt;    if (yy &lt; 1582 || yy &gt; 4881) return false;&lt;br /&gt;    if (mm == 2 &amp;&amp; (yy%400 == 0 || (yy%4 == 0 &amp;&amp; yy%100 != 0))) day[mm-1]++;&lt;br /&gt;    if (mm &lt; 1 || mm &gt; 12) return false;&lt;br /&gt;    if (dd &lt; 1 || dd &gt; day[mm-1]) return false;&lt;br /&gt;    t.setDate(dd); t.setMonth(mm-1); t.setFullYear(yy);&lt;br /&gt;    if (rng == &#39;p&#39; || rng == &#39;P&#39;) {&lt;br /&gt;        if (t &gt; today) return false;&lt;br /&gt;    }&lt;br /&gt;    else if (rng == &#39;f&#39; || rng == &#39;F&#39;) {&lt;br /&gt;        if (t &lt; today) return false;&lt;br /&gt;    }&lt;br /&gt;    else if (rng != &#39;a&#39; &amp;&amp; rng != &#39;A&#39;) return false;&lt;br /&gt;    return true;</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/5122295410888919139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/08/check-date.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/5122295410888919139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/5122295410888919139'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/08/check-date.html' title='Check the Date'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-1557776041650970732</id><published>2009-08-20T05:17:00.000-07:00</published><updated>2009-08-20T05:24:51.840-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript compare dates"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript date check"/><title type='text'>Compare two dates</title><content type='html'>When working with the date of birth we need to check the date. We can check the date by writing the server side script. But when writing the server side script it takes so much time for the user which may not be usefull in some scenarios.&lt;br /&gt;&lt;br /&gt;Below is the sample javascript method which compares the two date and proivdes the result whether the entered date is greater than the current date.&lt;br /&gt;&lt;br /&gt;    function comparedates()&lt;br /&gt;    {&lt;br /&gt;        var userdate=Date.parse(&quot;06/19/2008&quot;);&lt;br /&gt;       &lt;br /&gt;        var currentdate=new Date;&lt;br /&gt;        if(userdate&gt;Date.parse(currentdate))&lt;br /&gt;        {&lt;br /&gt;            alert(&quot;User Entered Date is greater then Current Date.&quot;);&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            alert(&quot;User Entered Date is less than the Current Date&quot;);&lt;br /&gt;        }&lt;br /&gt;    }</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/1557776041650970732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/08/compare-two-dates.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/1557776041650970732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/1557776041650970732'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/08/compare-two-dates.html' title='Compare two dates'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-7729403659947150369</id><published>2009-08-10T22:53:00.000-07:00</published><updated>2009-08-10T22:55:54.665-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript Image extension validation"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript Image validation"/><title type='text'>Validating the image</title><content type='html'>In the Forms the mostly common task we use is uploading the image. When uploading the image we are in need of certain condition like we  need only images to be uploaded or only the documents files to be uploaded.&lt;br /&gt;                       For such type of requirements we need to provide the javascript code for restricting the users from uploading. This script will be validated at the client side so there is not burden on the server side. Hence makes the server work more easier.&lt;br /&gt;&lt;br /&gt;Below is the javascript code for checking the uploaded image is image format or not and intern check whether the uploaded image format is jpg,gif or png format.&lt;br /&gt;&lt;br /&gt;function validate()&lt;br /&gt;{&lt;br /&gt;var extensions = new Array(&quot;jpg&quot;,&quot;jpeg&quot;,&quot;gif&quot;,&quot;png&quot;,&quot;bmp&quot;);&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;// Alternative way to create the array&lt;br /&gt;&lt;br /&gt;var extensions = new Array();&lt;br /&gt;&lt;br /&gt;extensions[1] = &quot;jpg&quot;;&lt;br /&gt;extensions[0] = &quot;jpeg&quot;;&lt;br /&gt;extensions[2] = &quot;gif&quot;;&lt;br /&gt;extensions[3] = &quot;png&quot;;&lt;br /&gt;extensions[4] = &quot;bmp&quot;;&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;var image_file = document.form.image_file.value;&lt;br /&gt;&lt;br /&gt;var image_length = document.form.image_file.value.length;&lt;br /&gt;&lt;br /&gt;var pos = image_file.lastIndexOf(&#39;.&#39;) + 1;&lt;br /&gt;&lt;br /&gt;var ext = image_file.substring(pos, image_length);&lt;br /&gt;&lt;br /&gt;var final_ext = ext.toLowerCase();&lt;br /&gt;&lt;br /&gt;for (i = 0; i &lt; extensions.length; i++)&lt;br /&gt;{&lt;br /&gt;    if(extensions[i] == final_ext)&lt;br /&gt;    {&lt;br /&gt;    return true;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;alert(&quot;You must upload an image file with one of the following extensions: &quot;+ extensions.join(&#39;, &#39;) +&quot;.&quot;);&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When ever you want to validate the file uploading control just copy this script and paste wherever you want to validate.If you want more formats you can add on the ext array.&lt;br /&gt;&lt;br /&gt;The form is&lt;br /&gt;&lt;br /&gt;&amp;#60form name=&quot;form&quot; action=&quot;http://test.com/test&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot; onSubmit=&quot;return validate();&quot;&amp;#62&lt;br /&gt;&amp;#60h2&gt;Validate image on upload&amp;#60/h2&amp;#62&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; Upload an image: &amp;#60INPUT type=&quot;file&quot; name=&quot;image_file&quot;&amp;#62 &amp;#60input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Submit&quot;&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60/form&amp;#62</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/7729403659947150369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/08/validating-image.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/7729403659947150369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/7729403659947150369'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/08/validating-image.html' title='Validating the image'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-1044091415810398421</id><published>2009-06-06T04:10:00.001-07:00</published><updated>2009-06-06T04:18:47.132-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fixed header"/><category scheme="http://www.blogger.com/atom/ns#" term="Fixed header and footer"/><category scheme="http://www.blogger.com/atom/ns#" term="header with no scroling"/><title type='text'>Fixed Header and footer</title><content type='html'>I have gone through so many websites for the fixed header and footer and i found the below code as the best suitable for any type of browser.&lt;br /&gt;           IN the below downloaded code you will view only the CSS file which will make your work so easier. Everything is maintained in the CSS fiie. You need to just download the files and copy the selected CSS and use where ever you need to keep the header and the footer styles.&lt;br /&gt;&lt;br /&gt;In this we have used the DIV tags to maintain the Header and the footer styles. The main advantage of this code is that it works best for all type of browsers(mozilla, internet explorer......)&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.filefactory.com/file/ag46708/n/fixedlayoutexample_htm&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQMYHsfZI-H7_vf5Wis1MfyKDTqUvolQuja7I60UbLQu3CExIzUIHj6ReUcCEsvk9ePrdufu8RvU4u7sexZbjW6JRiQCL3BPMpdt5gNx0p2R3G4ez2ciEkVcgn6ImeMOZ9eV4sh0H7qQ/s320/Downloads.png&quot;&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/1044091415810398421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/06/fixed-header-and-footer.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/1044091415810398421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/1044091415810398421'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/06/fixed-header-and-footer.html' title='Fixed Header and footer'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQMYHsfZI-H7_vf5Wis1MfyKDTqUvolQuja7I60UbLQu3CExIzUIHj6ReUcCEsvk9ePrdufu8RvU4u7sexZbjW6JRiQCL3BPMpdt5gNx0p2R3G4ez2ciEkVcgn6ImeMOZ9eV4sh0H7qQ/s72-c/Downloads.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-1575166242075970480</id><published>2009-05-22T22:00:00.000-07:00</published><updated>2009-05-22T22:13:02.448-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Image Slideshow"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Javascript Slideshow with timeout</title><content type='html'>We have so many sideshow available, The below also explains the same with some simple steps and with one java script method setTimeout).&lt;br /&gt;&lt;br /&gt;This makes our work so simple to rotating the images.&lt;br /&gt;&lt;br /&gt;&amp;#60html&amp;#62&lt;br /&gt;&amp;#60head&amp;#62&lt;br /&gt;&amp;#60title&amp;#6A Timed Slide Show&amp;#60/title&amp;#62&lt;br /&gt;&amp;#60script type = &quot;text/javascript&quot;&amp;#62&lt;br /&gt;&lt;br /&gt;var the_images = new Array();&lt;br /&gt;the_images[0] = new Image();&lt;br /&gt;the_images[0].src = &quot;one.jpg&quot;;&lt;br /&gt;the_images[1] = new Image();&lt;br /&gt;the_images[1].src = &quot;two.jpg&quot;;&lt;br /&gt;the_images[2] = new Image();&lt;br /&gt;the_images[2].src = &quot;three.jpg&quot;;&lt;br /&gt;var the_timeout;&lt;br /&gt; function rotateImage(index)&lt;br /&gt;{&lt;br /&gt;window.document.my_image.src = the_images[index].src;&lt;br /&gt; index++;&lt;br /&gt;if (index &gt;= the_images.length)&lt;br /&gt;{&lt;br /&gt;index = 0;&lt;br /&gt;}&lt;br /&gt; var the_function_string = &quot;rotateImage(&quot; + index + &quot;);&quot;;&lt;br /&gt; the_timeout = setTimeout(the_function_string, 1000);&lt;br /&gt;}&lt;br /&gt;Timing Events 165&lt;br /&gt;&lt;br /&gt;&amp;#60/script&amp;#62&lt;br /&gt;&amp;#60/head&amp;#62&lt;br /&gt;&amp;#60body&amp;#62&lt;br /&gt;&amp;#60img name = &quot;my_image&quot; src = &quot;one.jpg&quot;&amp;#62&lt;br /&gt;&amp;#60form&amp;#62&lt;br /&gt; &lt;input type = &quot;button&quot; value = &quot;start the show&quot; onClick = &quot;rotateImage(0);&quot;&gt;&lt;br /&gt;&lt;input type = &quot;button&quot; value = &quot;stop the show&quot;&lt;br /&gt;onClick = &quot;clearTimeout(the_timeout);&quot;&gt;&lt;br /&gt;&amp;#60/form&amp;#62&lt;br /&gt;&amp;#60/body&amp;#62&lt;br /&gt;&amp;#60/html&amp;#62&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Code Explaination:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first few lines set up the array containing the images we’ll put in the slide&lt;br /&gt;show. Line  creates the new array,  sets the first item in the array equal to&lt;br /&gt;an image object, and  sets the src of that image object to the first picture of&lt;br /&gt;the slide show. Lines  and  are just like the lines used to preload images&lt;br /&gt;before an image swap. The next few&lt;br /&gt;lines load the rest of the images.&lt;br /&gt;After the images have loaded,  and  set up two variables for use in the&lt;br /&gt;timing loop. Line  declares the_timeout, which keeps track of each time-out,&lt;br /&gt;and  keeps track of which image in the slide show to bring up next time the&lt;br /&gt;script calls rotateImage(). Keep in mind that declaring the index variable&lt;br /&gt;outside the rotateImage() function, as I’ve done here in , is not the safest&lt;br /&gt;programming practice—it’s just easier and quicker than the safe solution.&lt;br /&gt;A safer version of rotateImage() will be described subsequently.&lt;br /&gt;Next comes the rotateImage() function, which swaps in a new image and&lt;br /&gt;then calls itself in one second. The first line of the function does the&lt;br /&gt;image swap. It looks up the value of index, finds the src of the element numbered&lt;br /&gt;index in the the_images array, and swaps in that image for my_image (the&lt;br /&gt;image in).&lt;br /&gt;After swapping the image, the function adds 1 to the index variable. The&lt;br /&gt;next time rotateImage() gets called, it looks up the next item in the array and&lt;br /&gt;swaps in that item. We have to make sure the number stored in index doesn’t&lt;br /&gt;exceed the number of images stored in the the_images array. The if-then&lt;br /&gt;statement starting in takes care of this issue by ensuring that if index has&lt;br /&gt;incremented past the number of items in the array, it will be set back to 0&lt;br /&gt;(corresponding to the first image in the the_images array). The last line in the&lt;br /&gt;function should be old hat by now. This line sets a time-out to call the&lt;br /&gt;rotateImage() function in one second.&lt;br /&gt;Timing Events 163&lt;br /&gt;The slide show starts when a visitor presses the button that calls&lt;br /&gt;rotateImage() and ends when the user presses the Stop the Show button,&lt;br /&gt;canceling the most recently set time-out.</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/1575166242075970480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/05/javascript-slideshow-with-timeout.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/1575166242075970480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/1575166242075970480'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/05/javascript-slideshow-with-timeout.html' title='Javascript Slideshow with timeout'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-3559094483700730860</id><published>2009-05-09T12:19:00.001-07:00</published><updated>2009-05-09T12:36:20.922-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="scrolling"/><category scheme="http://www.blogger.com/atom/ns#" term="show web page content when scrolling comes"/><title type='text'>Show webpage content when scrolling comes</title><content type='html'>We may need to show some part of the page content. We will have the web pages with the page contents. When displaying the web pages there will be large content or small content. When we have the small content then the scrolling will not appear. So when we have the large content then we will have the scrolling option. So all the content will be scrolled from top to bottom.&lt;br /&gt;&lt;br /&gt;But we need to only some part of the content need to be scrolled when the scrolling option is scrolled. The main content will not be scrolled when the page is scrolled.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Preview&lt;/span&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-Oi3mX4kK0O5TDbvM-lkh1g-JHsffgezPein4W0q40I73qY7f4l1o9VF4fWqxxeWU2i1BCWDSmi2Un79CI73mx9wVrALlpnHjK07PzuyM-CMcgnGYL7FVZuylSy22zL9FPiic_ek/s1600-h/scrolling.JPG&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 134px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-Oi3mX4kK0O5TDbvM-lkh1g-JHsffgezPein4W0q40I73qY7f4l1o9VF4fWqxxeWU2i1BCWDSmi2Un79CI73mx9wVrALlpnHjK07PzuyM-CMcgnGYL7FVZuylSy22zL9FPiic_ek/s320/scrolling.JPG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5333909085270489282&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Code&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.filefactory.com/file/agg2138/n/webpagescrolling_zip&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQMYHsfZI-H7_vf5Wis1MfyKDTqUvolQuja7I60UbLQu3CExIzUIHj6ReUcCEsvk9ePrdufu8RvU4u7sexZbjW6JRiQCL3BPMpdt5gNx0p2R3G4ez2ciEkVcgn6ImeMOZ9eV4sh0H7qQ/s320/Downloads.png&quot; border=&quot;0&quot;&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/3559094483700730860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/05/show-webpage-content-when-scrolling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/3559094483700730860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/3559094483700730860'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/05/show-webpage-content-when-scrolling.html' title='Show webpage content when scrolling comes'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-Oi3mX4kK0O5TDbvM-lkh1g-JHsffgezPein4W0q40I73qY7f4l1o9VF4fWqxxeWU2i1BCWDSmi2Un79CI73mx9wVrALlpnHjK07PzuyM-CMcgnGYL7FVZuylSy22zL9FPiic_ek/s72-c/scrolling.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-1143016476276073852</id><published>2009-05-09T11:42:00.000-07:00</published><updated>2009-05-09T11:49:04.737-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript disable right click"/><title type='text'>Javascript disable right click</title><content type='html'>Disable right click option provides an option to disable the right click option when ever user wants to copy the content of the code. Disabling the right click also secures the data upto some part.&lt;br /&gt;&lt;br /&gt;This is mainly used for the important data not to be disclosed to another persons or you dont want to provide an option to copy the images from your site to any another sites. Now a days this is the most common task to disable the right click functionality.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Javascript Code&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#60html&amp;#62&lt;br /&gt;&amp;#60head&amp;#62&lt;br /&gt; &amp;#60script language=JavaScript&amp;#62&lt;br /&gt; var message=&quot;This is the example to disable the right click&quot;;&lt;br /&gt;///////////////////////////////////&lt;br /&gt;function clickIE4(){&lt;br /&gt;if (event.button==2){&lt;br /&gt;alert(message);&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function clickNS4(e){&lt;br /&gt;if (document.layers||document.getElementById&amp;&amp;!document.all){&lt;br /&gt;if (e.which==2||e.which==3){&lt;br /&gt;alert(message);&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (document.layers){&lt;br /&gt;document.captureEvents(Event.MOUSEDOWN);&lt;br /&gt;document.onmousedown=clickNS4;&lt;br /&gt;}&lt;br /&gt;else if (document.all&amp;&amp;!document.getElementById){&lt;br /&gt;document.onmousedown=clickIE4;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;document.oncontextmenu=new Function(&quot;alert(message);return false&quot;)&lt;br /&gt;&lt;br /&gt;// --&amp;#62 &lt;br /&gt;&amp;#60/script&amp;#62 &lt;br /&gt;&amp;#60/head&amp;#62&lt;br /&gt;&amp;#60body&amp;#62&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is the web page content ... You can place any content here................&lt;br /&gt;&amp;#60/body&amp;#62&lt;br /&gt;&amp;#60/html&amp;#62</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/1143016476276073852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/05/javascript-disable-right-click.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/1143016476276073852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/1143016476276073852'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/05/javascript-disable-right-click.html' title='Javascript disable right click'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-1603714169436935294</id><published>2009-04-30T11:18:00.000-07:00</published><updated>2009-04-30T11:47:30.994-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Calender"/><title type='text'>Displaying Calender through javascript</title><content type='html'>Displaying the Calender is the most common script in all the websites. Now-a-days in every web application requiring the calender application. We have so many calender scripts found in the internet if we search, But i prefer this is the most user friendly calender script we can use. This was downloaded from cool dhtml website.&lt;br /&gt;&lt;br /&gt;I have used this and found to be very useful and very flexible. IN the provided example we are given with all the possible options like displaying only the date or displaying the date and time option, By clicking single click the calender script will be pop up and we can select the appropriate date.&lt;br /&gt;&lt;br /&gt;All the events are clearly mentioned. We can directly paste the code in our application and can use the following code.In this script we are provided with the draggable option.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Preview&lt;/span&gt;&lt;br /&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 133px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggzMaVDuQoxsfBLLrP5GDEzZa6h4YoE5LsZV9jGNUs21kaoUoBGVN0HB6ZERZnYUM2whs7Rvj2CMCkJ_nhUWQb1vycVzYMeN8I4O8BDwzugteji3SJ4aaR7zLZ25jfiXZdiFfL9-sk/s320/calender.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5330554418254842162&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.filefactory.com/file/age44e8/n/jscalendar-1_0_zip&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQMYHsfZI-H7_vf5Wis1MfyKDTqUvolQuja7I60UbLQu3CExIzUIHj6ReUcCEsvk9ePrdufu8RvU4u7sexZbjW6JRiQCL3BPMpdt5gNx0p2R3G4ez2ciEkVcgn6ImeMOZ9eV4sh0H7qQ/s320/Downloads.png&quot;  border=&quot;0&quot;&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/1603714169436935294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/displaying-calender-through-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/1603714169436935294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/1603714169436935294'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/displaying-calender-through-javascript.html' title='Displaying Calender through javascript'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggzMaVDuQoxsfBLLrP5GDEzZa6h4YoE5LsZV9jGNUs21kaoUoBGVN0HB6ZERZnYUM2whs7Rvj2CMCkJ_nhUWQb1vycVzYMeN8I4O8BDwzugteji3SJ4aaR7zLZ25jfiXZdiFfL9-sk/s72-c/calender.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-3209856333785621417</id><published>2009-04-20T11:28:00.000-07:00</published><updated>2009-04-20T11:52:28.931-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Reserved Key words and Triggering scripts with events</title><content type='html'>Javascript has some strict rules and referring to vairables. Your function name and variable name must begin with a letter and they can contain only letters, number and underscores. By conversion function and variables names must begin with lower letters, but they use uppercase for additional words. For example autotext() is completly different from autoText() in the javascript. Javascript is case sensitive.&lt;br /&gt;&lt;br /&gt;Reserved Keywords:&lt;br /&gt;&lt;br /&gt;abstract , boolean , byte , case , catch , char , class , const , debugger , default&lt;br /&gt;delete , do , double , else , enum , export , extends , false , final , finally , float , for , function , goto , if , imports , in , int , interface , null , new , package&lt;br /&gt;public , protected , return , this , throw , throws , typeof , true , try , void&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Triggering scripts with events&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;autoText&lt;/span&gt; The scripts loads when a page is loaded. Like this we can call scripts when the user clicks the button or mouse overs on a image. Each of these clicks are called as events.&lt;br /&gt;        Some events are used by the document&#39;s BODY as a whole, and some are used by specific tags such as images , anchor tags , buttons.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Events that are assigned to the BODY Tag&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;1. onLoad&lt;/span&gt; when the document loads.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2. onUnload&lt;/span&gt; When a new document is loaded.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;3. onFocus&lt;/span&gt; When the browser window recieves focus.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;4. onBlur&lt;/span&gt; When the browser window loses focus.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;5. onHelp&lt;/span&gt; when the user presses F1(IE only).&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;6. onKeypress&lt;/span&gt; when the user presses a key. Except the function keys.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Events that are used to tags includes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;1.onFocus&lt;/span&gt; When the tag receives focus.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2.onBlur&lt;/span&gt; When the tag loses the focus.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;3. onMouseOver&lt;/span&gt; When the user moves the mouse over the tag.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;4. onMouseOut&lt;/span&gt; When the use moves the mouse away from the tag.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;5. onChange&lt;/span&gt; When a form element value is changed.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;6. onClick&lt;/span&gt; When a tag is clicked.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;7. onSubmit&lt;/span&gt; When a form is submitted.&lt;br /&gt;&lt;br /&gt;we can use these events to run our scripts based on different user actions</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/3209856333785621417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/reserved-key-words-and-triggering.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/3209856333785621417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/3209856333785621417'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/reserved-key-words-and-triggering.html' title='Reserved Key words and Triggering scripts with events'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-725866389572372419</id><published>2009-04-19T01:51:00.000-07:00</published><updated>2009-04-19T02:16:53.125-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Checkbox"/><title type='text'>Checkbox array Enable / Disable</title><content type='html'>There will be two types of checkboxes one is the general checkbox and the second is the checkbox array. There will be a scenario that we need to read the value from the checkbox or the checkbox array.&lt;br /&gt;&lt;br /&gt;Writing a javascript for the general checkbox is more easy when compared to the checkbox array. We need to write the javascript for checkbox array For example : We have a music options available and we need to provide option to enable the disable the checkbox array.&lt;br /&gt;&lt;br /&gt;The below code explains how to enable and disable the checkbox array.&lt;br /&gt;&lt;br /&gt;&amp;#60Html&amp;#62&lt;br /&gt;&amp;#60head&amp;#62&lt;br /&gt;//Music skills&lt;br /&gt;function musicskills(value)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;if(value==1)&lt;br /&gt;{&lt;br /&gt;  &lt;br /&gt;  chkvaluer=document.form.elements[&#39;chkmusic[]&#39;];&lt;br /&gt;  for (r=0;r&amp;#60chkvaluer.length;r++)&lt;br /&gt;  {&lt;br /&gt;         chkvaluer[r].disabled = true;&lt;br /&gt;  }&lt;br /&gt;  document.form.txtmusic.disabled = true; &lt;br /&gt;}else{&lt;br /&gt;  &lt;br /&gt;  chkvaluer=document.form.elements[&#39;chkmusic[]&#39;];&lt;br /&gt;  for (r=0;r&amp;#60chkvaluer.length;r++)&lt;br /&gt;  {&lt;br /&gt;   chkvaluer[r].disabled = false;&lt;br /&gt;  }&lt;br /&gt;  document.form.txtmusic.disabled = false; &lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;#60/head&amp;#62&lt;br /&gt;&amp;#60body&amp;#62&lt;br /&gt;&amp;#60form name=&quot;form&quot; method=&quot;post&quot; action=&quot;testfile.php&quot;&amp;#62&lt;br /&gt;&amp;#60input type=&quot;radio&quot; value=&quot;yes&quot; onClick=&quot;musicskills(0);&quot;&amp;#62Yes&lt;br /&gt;&amp;#60input type=&quot;radio&quot; value=&quot;no&quot; onClick=&quot;musicskills(1);&quot;&amp;#62No&lt;br /&gt;&amp;#60input type=&quot;checkbox&quot; name=&quot;chkmusic[]&quot; value=&quot;Punjabi&quot;&amp;#62Punjabi&lt;br /&gt;&amp;#60input type=&quot;checkbox&quot; name=&quot;chkmusic[]&quot; value=&quot;classical&quot;&amp;#62Classical&lt;br /&gt;&amp;#60input type=&quot;checkbox&quot; name=&quot;chkmusic[]&quot; value=&quot;devotional&quot;&amp;#62Devotional&lt;br /&gt;&amp;#60input type=&quot;checkbox&quot; name=&quot;chkmusic[]&quot; value=&quot;westren&quot;&amp;#62Westren&lt;br /&gt;&amp;#60/body&amp;#62&lt;br /&gt;&amp;#60/html&amp;#62</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/725866389572372419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/checkbox-array-enable-disable.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/725866389572372419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/725866389572372419'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/checkbox-array-enable-disable.html' title='Checkbox array Enable / Disable'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-3133952523423791610</id><published>2009-04-16T04:12:00.000-07:00</published><updated>2009-04-18T12:55:05.496-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Checkbox"/><title type='text'>Checkbox read only</title><content type='html'>The below code will explain how can we make the checkbox enable and disable. Here we use the function deDemo() to enable / disable the checkbox and return the value of the checkbox is enabled.&lt;br /&gt;&lt;br /&gt;&amp;#60html&amp;#62&lt;br /&gt;&amp;#60head&amp;#62&lt;br /&gt;&amp;#60script type=&quot;text/javascript&quot;&amp;#62&lt;br /&gt;  function doDemo(form) {&lt;br /&gt;    var cbObj = form.cbObj;&lt;br /&gt;&lt;br /&gt;    if (cbObj.checked)&lt;br /&gt;      alert(&quot;Value is &quot; + cbObj.value);&lt;br /&gt;    else&lt;br /&gt;      alert(&quot;No value will be submitted.&quot;);&lt;br /&gt;&lt;br /&gt;    if (cbObj.disabled)&lt;br /&gt;      cbObj.disabled = false;&lt;br /&gt;    else&lt;br /&gt;      cbObj.disabled = true;&lt;br /&gt;  }&lt;br /&gt;&amp;#60/script&amp;#62&lt;br /&gt;&amp;#60/head&amp;#62&lt;br /&gt;&amp;#60body&amp;#62&lt;br /&gt;&amp;#60center&amp;#62&lt;br /&gt;&amp;#60b&amp;#62Read-only Checkbox Demo&amp;#60/b&amp;#62&lt;br /&gt;&amp;#60form&amp;#62&lt;br /&gt;&amp;#60input type=&quot;checkbox&quot; name=&quot;cbObj&quot; value=&quot;Y&quot; disabled&amp;#62&lt;br /&gt;&amp;#60p&gt;&lt;br /&gt;&amp;#60input type=&quot;button&quot; value=&quot;Execute&quot; onClick=&quot;doDemo(this.form)&quot;&amp;#62&lt;br /&gt;&amp;#60/form&amp;#62&lt;br /&gt;&amp;#60hr&amp;#62&lt;br /&gt;&amp;#60/center&amp;#62&lt;br /&gt;&amp;#60/body&amp;#62&lt;br /&gt;&amp;#60/html&amp;#62</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/3133952523423791610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/checkbox-read-only.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/3133952523423791610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/3133952523423791610'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/checkbox-read-only.html' title='Checkbox read only'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-2489350001551009548</id><published>2009-04-11T03:32:00.000-07:00</published><updated>2009-04-11T04:29:06.449-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Checkbox"/><title type='text'>Checkbox array select / unselect</title><content type='html'>Generally in the checkbox, we have two different type of checkboxes one are plain checkboxes and the second one are checkbox array. The javascript for both differs a lot. The default checkbox script will be very simple to write and can be found any where in the net. The checkbox array scripts would be difficult.&lt;br /&gt;&lt;br /&gt;The below example would define how to write a javascript for a checkbox array.&lt;br /&gt;&lt;br /&gt;&amp;#60html&amp;#62&lt;br /&gt;&amp;#60head&amp;#62&lt;br /&gt;&amp;#60script language=&quot;javascript&quot;&amp;#62&lt;br /&gt;function checkarray(form) {&lt;br /&gt;var total = 0;&lt;br /&gt;var max = document.form.elements[&#39;gender[]&#39;].length;&lt;br /&gt; &lt;br /&gt;for (var idx = 0; idx&amp;#60max; idx++) {&lt;br /&gt;&lt;br /&gt;if(document.form.elements[&#39;gender[]&#39;][idx].checked==true)&lt;br /&gt;{&lt;br /&gt;   &lt;br /&gt;  if(document.form.elements[&#39;gender[]&#39;][idx].value==&quot;any&quot;)&lt;br /&gt;  {&lt;br /&gt;    for (var idx1 = 0; idx1&amp;#60max; idx1++) {&lt;br /&gt;    &lt;br /&gt; document.form.elements[&#39;gender[]&#39;][idx1].checked=true;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;}else{&lt;br /&gt;      if(document.form.elements[&#39;gender[]&#39;][idx].value==&quot;any&quot;)&lt;br /&gt;  {&lt;br /&gt;    for (var idx1 = 0; idx1&amp;#60max; idx1++) {&lt;br /&gt;    &lt;br /&gt; document.form.elements[&#39;gender[]&#39;][idx1].checked=false;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function checkarray1(form) {&lt;br /&gt;var total = 0;&lt;br /&gt;var max = document.form.elements[&#39;gender[]&#39;].length;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;for (var idx = 0; idx&amp;#60max; idx++) {&lt;br /&gt;var cc=0;&lt;br /&gt;if(document.form.elements[&#39;gender[]&#39;][idx].checked==true)&lt;br /&gt;{&lt;br /&gt;   &lt;br /&gt;  if(document.form.elements[&#39;gender[]&#39;][idx].value==&quot;any&quot;)&lt;br /&gt;  {&lt;br /&gt;   cc=1;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;}else{&lt;br /&gt;     if(document.form.elements[&#39;gender[]&#39;][idx].value==&quot;m&quot;)&lt;br /&gt;  {&lt;br /&gt;     &lt;br /&gt;    &lt;br /&gt; document.form.elements[&#39;gender[]&#39;][&#39;0&#39;].checked=false;;&lt;br /&gt;  &lt;br /&gt;  }&lt;br /&gt;       if(document.form.elements[&#39;gender[]&#39;][idx].value==&quot;f&quot;)&lt;br /&gt;  {&lt;br /&gt;     &lt;br /&gt;    &lt;br /&gt; document.form.elements[&#39;gender[]&#39;][&#39;0&#39;].checked=false;;&lt;br /&gt;  &lt;br /&gt;  }&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;}&lt;br /&gt;&amp;#60/script&amp;#62&lt;br /&gt;&amp;#60/head&amp;#62&lt;br /&gt;&amp;#60body&amp;#62&lt;br /&gt;&amp;#60table class=&quot;right_linksr&quot; width=&quot;100%&quot; align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&amp;#62&lt;br /&gt;                                   &amp;#60tbody&amp;#62&amp;#60tr&amp;#62&lt;br /&gt;                                      &amp;#60td valign=&quot;middle&quot; width=&quot;10%&quot; align=&quot;left&quot;&amp;#62&amp;#60label&amp;#62&lt;br /&gt;&lt;br /&gt;                                        &amp;#60input size=&quot;5&quot; name=&quot;gender[]&quot; onclick=&quot;checkarray(this.form)&quot; value=&quot;any&quot; type=&quot;checkbox&quot;&amp;#62&lt;br /&gt;                                      &amp;#60/label&amp;#62&amp;#60/td&amp;#62&lt;br /&gt;                                      &amp;#60td valign=&quot;middle&quot; width=&quot;90%&quot; align=&quot;left&quot;&amp;#62Any Gender&amp;#60/td&amp;#62&lt;br /&gt;                                    &amp;#60/tr&amp;#62&lt;br /&gt;                                    &amp;#60tr&amp;#62&lt;br /&gt;                                      &amp;#60td valign=&quot;middle&quot; width=&quot;10%&quot; align=&quot;left&quot;&amp;#62&amp;#60input name=&quot;gender[]&quot; onclick=&quot;checkarray1(this.form)&quot; value=&quot;f&quot; type=&quot;checkbox&quot;&amp;#62&amp;#60/td&amp;#62&lt;br /&gt;                                      &amp;#60td valign=&quot;middle&quot; width=&quot;90%&quot; align=&quot;left&quot;&amp;#62Female&amp;#60/td&amp;#62&lt;br /&gt;                                    &amp;#60/tr&amp;#62&lt;br /&gt;&lt;br /&gt;                                    &amp;#60tr&amp;#62&lt;br /&gt;                                      &amp;#60td valign=&quot;middle&quot; width=&quot;10%&quot; align=&quot;left&quot;&amp;#62&amp;#60input name=&quot;gender[]&quot; onclick=&quot;checkarray1(this.form)&quot; value=&quot;m&quot; checked=&quot;checked/&quot; type=&quot;checkbox&quot;&amp;#62&amp;#60/td&amp;#62&lt;br /&gt;                                      &amp;#60td valign=&quot;middle&quot; width=&quot;90%&quot; align=&quot;left&quot;&amp;#62Male&amp;#60/td&amp;#62&lt;br /&gt;                                    &amp;#60/tr&amp;#62&lt;br /&gt;                                  &amp;#60/tbody&amp;#62&amp;#60/table&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60/body&amp;#62&lt;br /&gt;&amp;#60/html&amp;#62&lt;br /&gt;&lt;br /&gt;Here we have two javascripts function used. One function checkarray() selects all the checkboxes and the function checkarray1() unselects the any checkbox if any of the another checkbox is selected.</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/2489350001551009548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/checkbox-array-select-unselect.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/2489350001551009548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/2489350001551009548'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/checkbox-array-select-unselect.html' title='Checkbox array select / unselect'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-5603386026321353256</id><published>2009-04-11T03:20:00.000-07:00</published><updated>2009-04-11T03:29:58.326-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Checkbox"/><title type='text'>Checkbox array Mutiple select</title><content type='html'>Generally in the checkbox, we have two different type of checkboxes one are plain checkboxes and the second one are checkbox array. The javascript for both differs a lot. The default checkbox script will be very simple to write and can be found any where in the net. The checkbox array scripts would be difficult.&lt;br /&gt;&lt;br /&gt;The below example would define how to write a javascript for a checkbox array.&lt;br /&gt;&lt;br /&gt;Example: Use checkbox array and have the option to checkall and uncheckall.&lt;br /&gt;&lt;br /&gt;&amp;#60html&amp;#62&lt;br /&gt;&amp;#60head&amp;#62&lt;br /&gt;&amp;#60script language=&quot;javascript&quot;&amp;#62&lt;br /&gt;function anyCheck(form) {&lt;br /&gt;var total = 0;&lt;br /&gt;var max = document.form.elements[&#39;list[]&#39;].length;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;for (var idx = 0; idx&amp;#60max; idx++) {&lt;br /&gt;&lt;br /&gt;if(document.form.elements[&#39;list[]&#39;][idx].checked==true)&lt;br /&gt;{&lt;br /&gt;   &lt;br /&gt;  if(document.form.elements[&#39;list[]&#39;][idx].value==1)&lt;br /&gt;  {&lt;br /&gt;    for (var idx1 = 0; idx1&amp;#60max; idx1++) {&lt;br /&gt;    &lt;br /&gt; document.form.elements[&#39;list[]&#39;][idx1].checked=true;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;}else{&lt;br /&gt;      if(document.form.elements[&#39;list[]&#39;][idx].value==1)&lt;br /&gt;  {&lt;br /&gt;    for (var idx1 = 0; idx1&amp;#60max; idx1++) {&lt;br /&gt;    &lt;br /&gt; document.form.elements[&#39;list[]&#39;][idx1].checked=false;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//alert(total);&lt;br /&gt;}&lt;br /&gt;//alert(&#39;ns&#39;);&lt;br /&gt;//alert(&#39;ns&#39;);&lt;br /&gt;&lt;br /&gt;//alert(&quot;You selected &quot; + total + &quot; boxes.&quot;);&lt;br /&gt;}&lt;br /&gt;&amp;#60/script&amp;#62&lt;br /&gt;&amp;#60/head&amp;#62&lt;br /&gt;&amp;#60body&amp;#62&lt;br /&gt;&amp;#60form name=&quot;form&quot; action=&quot;test.html&quot; method=&quot;post&quot;&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60input type=&quot;checkbox&quot; name=&quot;list[]&quot; value=&quot;1&quot; onClick=&quot;anyCheck(this.form)&quot;&amp;#62Checkall&amp;#60br&amp;#62&lt;br /&gt;&amp;#60input type=&quot;checkbox&quot; name=&quot;list[]&quot; value=&quot;2&quot;&amp;#62Javascript&amp;#60br&amp;#62&lt;br /&gt;&amp;#60input type=&quot;checkbox&quot; name=&quot;list[]&quot; value=&quot;3&quot;&amp;#62Active Server Pages&amp;#60br&amp;#62&lt;br /&gt;&amp;#60input type=&quot;checkbox&quot; name=&quot;list[]&quot; value=&quot;4&quot;&amp;#62HTML&amp;#60br&amp;#62&lt;br /&gt;&amp;#60input type=&quot;checkbox&quot; name=&quot;list[]&quot; value=&quot;5&quot;&amp;#62SQL&amp;#60br&amp;#62&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#60/form&amp;#62&lt;br /&gt;&amp;#60/body&amp;#62&lt;br /&gt;&lt;br /&gt;The script anyCheck() function will validate the checkboxes.</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/5603386026321353256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/checkbox-array-mutiple-select.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/5603386026321353256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/5603386026321353256'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/checkbox-array-mutiple-select.html' title='Checkbox array Mutiple select'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-6925883538720364660</id><published>2009-04-03T05:38:00.000-07:00</published><updated>2009-04-05T07:52:26.619-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Increase website font</title><content type='html'>This example mainly concentrates in the font of the web application. We use a default font in our websites and there may be situation we need to increase the font size of the text in the website. The example will help you to increase the font of your web application.&lt;br /&gt;&lt;br /&gt;For using the example you need to download the javascript file and add place it in your folder. Call the javascript in the html or any page. Before using this javascript you need to to maintain the structure of the html. &amp;#60body&amp;#62 tag must be started and as well as closed. You need to take care about this.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.mediafire.com/download.php?n4md2mw1yao&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUGi-NAKS2Fi7PPo6ad1YGoU8PHkNs0WYg-SMDo4d6eAikojIFqvQWbvXzK3lIEbNW7wp3LSOQz9yp8XgKe5vRa4ZDzJQTIEPj9Y98Ivw3fd83OLoE6sVfPAzfVC8rGMVyN5q5jXV57A/s320/Downloads.png&quot; border=&quot;0&quot;&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/6925883538720364660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/increase-website-font.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/6925883538720364660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/6925883538720364660'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/04/increase-website-font.html' title='Increase website font'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-1775528154144115782</id><published>2009-03-30T09:58:00.000-07:00</published><updated>2009-04-05T07:50:29.985-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tabs in html"/><title type='text'>Ajax Tabs Content script</title><content type='html'>This is a versatile Ajax Tabs Content script that lets you display content pulled from external files inside a DIV and organized via CSS tabs. A fully unobtrusive, CSS and HTML based script, it supports practical features such as persistence of the active tab (ie: when page is reloaded), an &quot;IFRAME&quot; mode, a &quot;slideshow&quot; mode, ability to expand/contract arbitrary DIVs on the page at the same time, nested tabs, and much more.&lt;br /&gt;&lt;br /&gt;Here&#39;s a quick outline of the script features:&lt;br /&gt;&lt;br /&gt;    * Fetch and display an external page (from the same domain) inside a container when a tab is clicked on via Ajax.&lt;br /&gt;    * (v 2.0) Apart from Ajax, an external page can also be fetched and displayed via the IFRAME element instead. This is useful for external pages that either contain JavaScript/ CSS code that doesn&#39;t run properly when fetched via Ajax, or the page is from an outside domain.&lt;br /&gt;    * Add a &quot;default&quot; content inside the container to either be shown while no tabs are selected, or to be associated with a specific tab. The default content is added inline on the page and not fetched via Ajax, to avoid unnecessary fetching of external pages.&lt;br /&gt;    * Supports session only persistence, so the last tab user clicked on is remembered if he/she returns to the page within the same browser session.&lt;br /&gt;This is taken from dynamicdrive.com&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;SCREEN SHOT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBCpeElhH-7tEuf09yvGqZiDKeQ6reSpl1OsmEuQpXJODuon24Pn8oXKaLk_Y9wdtjfbWrwnAsoc4tRVdLguAay0_QdQrbrn22SX5BIRL0fem5_JXnxEP2V4ZupjjsSyLDHqOBi7T5/s1600-h/tab.JPG&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 135px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBCpeElhH-7tEuf09yvGqZiDKeQ6reSpl1OsmEuQpXJODuon24Pn8oXKaLk_Y9wdtjfbWrwnAsoc4tRVdLguAay0_QdQrbrn22SX5BIRL0fem5_JXnxEP2V4ZupjjsSyLDHqOBi7T5/s320/tab.JPG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5319043011732003474&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&#39;http://www.mediafire.com/download.php?mjw0zixynmn&#39;&gt;&lt;img src=&#39;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUGi-NAKS2Fi7PPo6ad1YGoU8PHkNs0WYg-SMDo4d6eAikojIFqvQWbvXzK3lIEbNW7wp3LSOQz9yp8XgKe5vRa4ZDzJQTIEPj9Y98Ivw3fd83OLoE6sVfPAzfVC8rGMVyN5q5jXV57A/s320/Downloads.png&#39; border=&#39;0&#39;&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/1775528154144115782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/ajax-tabs-content-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/1775528154144115782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/1775528154144115782'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/ajax-tabs-content-script.html' title='Ajax Tabs Content script'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBCpeElhH-7tEuf09yvGqZiDKeQ6reSpl1OsmEuQpXJODuon24Pn8oXKaLk_Y9wdtjfbWrwnAsoc4tRVdLguAay0_QdQrbrn22SX5BIRL0fem5_JXnxEP2V4ZupjjsSyLDHqOBi7T5/s72-c/tab.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-6636720851033900906</id><published>2009-03-27T07:39:00.000-07:00</published><updated>2009-04-05T07:53:02.094-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Slideshows"/><title type='text'>Image slideshow with back and prev buttons</title><content type='html'>This script shows the image gallery slide show with prev and next buttons. When clicked in the next button the next 6 images are displayed. when clicked on the thumbnail the image is popuped up. First all the small thumbnails are displayed. When clicked on the thumbnail image is enlarged.&lt;br /&gt;&lt;br /&gt;&amp;#60span style=&quot;font-weight:bold;&quot;&amp;#62Add thumbnails&amp;#60/span&amp;#62&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Thumbnails are inserted into the HTML code in the following format&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#60div class=&quot;strip_of_thumbnails&quot;&amp;#62&amp;#60div&amp;#62&amp;#60a id=&quot;firstThumbnailLink&quot; href=&quot;#&quot; onclick=&quot;showPreview(&#39;images/image1_big.jpg&#39;,this);return false;&quot;&amp;#62&amp;#60img src=&quot;images/image1.jpg&quot;&amp;#62&amp;#60/a&amp;#62&amp;#60/div&amp;#62&amp;#60div&amp;#62&amp;#60a href=&quot;#&quot; onclick=&quot;showPreview(&#39;images/image2_big.jpg&#39;,this);return false;&quot;&amp;#62&amp;#60img src=&quot;images/image2.jpg&quot;&amp;#62&amp;#60/a&amp;#62&amp;#60/div&amp;#62&amp;#60div&amp;#62&amp;#60a href=&quot;#&quot; onclick=&quot;showPreview(&#39;images/image3_big.jpg&#39;,this);returnfalse;&quot;&amp;#62&amp;#60img src=&quot;images/image3.jpg&quot;&amp;#62&amp;#60/a&amp;#62&amp;#60/div&amp;#62&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60div class=&quot;strip_of_thumbnails&quot;&amp;#62 is the parent element of a vertical &quot;strip&quot; of thumbnails. How many thumbnails you add inside this div depends on your layout. In the demo, I have used 3 images.&lt;br /&gt;&lt;br /&gt;Also note that id=&quot;firstThumbnailLink&quot; is only applied to the first thumbnail. It is used to initially highlight this thumbnail&lt;br /&gt;Layout&lt;br /&gt;&lt;br /&gt;Width, height, border colors etc. are controlled by CSS. Look at the comment in image-slideshow-5.css for help.&lt;br /&gt;Initialize the script&lt;br /&gt;&lt;br /&gt;The slideshow script is initialized with these lines at the bottom of the HTML file:&lt;br /&gt;&lt;br /&gt;&amp;#60script type=&quot;text/javascript&quot;&amp;#62&lt;br /&gt;initGalleryScript(); // Initialize script&lt;br /&gt;&amp;#60/script&amp;#62&lt;br /&gt;Speed of animations&lt;br /&gt;&lt;br /&gt;You can control the speed of how fast the opacity changes on the large images, and how fast you want the thumbnail pane to slide when you click on the arrows. This is done by adjusting the javascript variables opacitySpeed, opacitySteps, slideSpeed and slideSteps at the top of image-slideshow-5.js.&lt;br /&gt;Number of thumbnail columns&lt;br /&gt;&lt;br /&gt;Usually, the script is able to measure how many columns of thumbnails you have automatically. However, if you have a slideshow where the script isn&#39; table to show all your columns, you can set number of columns manually at the top of image-slideshow.js. This is done in the variable var columnsOfThumbnails&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;SCREENSHOT&lt;/span&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinoFj1D3mwerB1npMi4WcmL6xwjP1JrTDvnOsw6hxspOslKiBmEUFOqh5V71Ax1aT9lEEj1vx9nhmIyq6b5vD3StgDTSxQVo-iSOnVkIqrEyzcskODWgtZa6LHBXkIBqzZ_bcvDa9U/s1600-h/image.JPG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 150px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinoFj1D3mwerB1npMi4WcmL6xwjP1JrTDvnOsw6hxspOslKiBmEUFOqh5V71Ax1aT9lEEj1vx9nhmIyq6b5vD3StgDTSxQVo-iSOnVkIqrEyzcskODWgtZa6LHBXkIBqzZ_bcvDa9U/s320/image.JPG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5317883316726756082&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.mediafire.com/download.php?aqkzzq2z2mm&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUGi-NAKS2Fi7PPo6ad1YGoU8PHkNs0WYg-SMDo4d6eAikojIFqvQWbvXzK3lIEbNW7wp3LSOQz9yp8XgKe5vRa4ZDzJQTIEPj9Y98Ivw3fd83OLoE6sVfPAzfVC8rGMVyN5q5jXV57A/s320/Downloads.png&quot;&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/6636720851033900906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/image-slideshow-with-back-and-prev.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/6636720851033900906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/6636720851033900906'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/image-slideshow-with-back-and-prev.html' title='Image slideshow with back and prev buttons'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinoFj1D3mwerB1npMi4WcmL6xwjP1JrTDvnOsw6hxspOslKiBmEUFOqh5V71Ax1aT9lEEj1vx9nhmIyq6b5vD3StgDTSxQVo-iSOnVkIqrEyzcskODWgtZa6LHBXkIBqzZ_bcvDa9U/s72-c/image.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-7009167840209873560</id><published>2009-03-25T11:59:00.000-07:00</published><updated>2009-03-25T12:05:38.431-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Checkbox"/><title type='text'>Javascript for Checkbox array</title><content type='html'>I have searched so many javascripts for writing a code for the checkbox array example &quot;&amp;#60 input type=&quot;checkbox&quot; name=&quot;check[]&quot; &amp;#62&quot; But i could not find a single javascript. You will get so many scripts for a simple checkbox with name &quot;check&quot; , which can be found with a simple search, But this type of scenario&#39;s cannot be found easily. So we are updating the javascript so that you can use it when needed.&lt;br /&gt;&lt;br /&gt;&amp;#60html&amp;#62&lt;br /&gt;&amp;#60head&amp;#62&lt;br /&gt; &lt;br /&gt;&amp;#60script language=&quot;javascript&quot;&amp;#62&lt;br /&gt;function anyCheck(form) {&lt;br /&gt;var total = 0;&lt;br /&gt;var max = document.playlist.elements[&#39;ckbox[]&#39;].length;&lt;br /&gt;alert(max);&lt;br /&gt;for (var idx = 0; idx &amp;#60 max; idx++) {&lt;br /&gt;if(document.playlist.elements[&#39;ckbox[]&#39;][idx].checked==true){&lt;br /&gt;    total += 1;&lt;br /&gt; //alert(total);&lt;br /&gt;   }&lt;br /&gt;   //alert(&#39;ns&#39;);&lt;br /&gt;}&lt;br /&gt;alert(&quot;You selected &quot; + total + &quot; boxes.&quot;);&lt;br /&gt;}&lt;br /&gt;&amp;#60/script&amp;#62&lt;br /&gt;&amp;#60/head&amp;#62&lt;br /&gt;&amp;#60body&amp;#62&lt;br /&gt; &lt;br /&gt;&amp;#60form method=&quot;post&quot; name=playlist&amp;#62&lt;br /&gt;1&amp;#60input type=checkbox name=ckbox[]&amp;#62&lt;br /&gt;&amp;#60br&amp;#622&amp;#60input type=checkbox name=ckbox[]&amp;#62&lt;br /&gt;&amp;#60br&amp;#623&amp;#60input type=checkbox name=ckbox[]&amp;#62&lt;br /&gt;&amp;#60br&amp;#624&amp;#60input type=checkbox name=ckbox[]&amp;#62&lt;br /&gt;&amp;#60br&amp;#625&amp;#60input type=checkbox name=ckbox[]&amp;#62&lt;br /&gt;&amp;#60br&amp;#626&amp;#60input type=checkbox name=ckbox[]&amp;#62&lt;br /&gt;&amp;#60br&amp;#627&amp;#60input type=checkbox name=ckbox[]&amp;#62&lt;br /&gt;&amp;#60br&amp;#628&amp;#60input type=checkbox name=ckbox[]&amp;#62&lt;br /&gt;&amp;#60br&amp;#629&amp;#60input type=checkbox name=ckbox[]&amp;#62&lt;br /&gt;&amp;#60p&amp;#62&amp;#60input type=button value=&quot;Count Checkboxes&quot; onClick=&quot;anyCheck(this.form)&quot;&amp;#62&lt;br /&gt;&amp;#60/form&amp;#62&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &amp;#60/body&amp;#62&lt;br /&gt; &amp;#60/html&amp;#62&lt;br /&gt;&lt;br /&gt;Here the method is used is anyCheck(). Which will invoke the javascript method. When we invoke the javascript method  document.playlist.elements[&#39;ckbox[]&#39;].length will calculate the length of the checkbox array value and if condition will evaluate which checkbox is checked and returns the total count.</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/7009167840209873560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/javascript-for-checkbox-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/7009167840209873560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/7009167840209873560'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/javascript-for-checkbox-array.html' title='Javascript for Checkbox array'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-950904823467521790</id><published>2009-03-23T12:54:00.000-07:00</published><updated>2009-03-23T12:57:25.438-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tabs in html"/><title type='text'>Tabs using javascript</title><content type='html'>This is the second example to creating the tabs in the html by using Div tag and the javascript.&lt;br /&gt;&lt;br /&gt;The example will explain of how to create the tabs using div tag&lt;br /&gt;&lt;br /&gt;&amp;#60html&amp;#62&lt;br /&gt;&amp;#60head&amp;#62&lt;br /&gt;&amp;#60link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;tabcontent.css&quot; /&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60script type=&quot;text/javascript&quot; src=&quot;tabcontent.js&quot;&amp;#62&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&amp;#60/script&amp;#62&lt;br /&gt;&amp;#60/head&amp;#62&lt;br /&gt;&amp;#60body&amp;#62&lt;br /&gt;&amp;#60ul id=&quot;countrytabs&quot; class=&quot;shadetabs&quot;&amp;#62&lt;br /&gt;&amp;#60li&amp;#62&amp;#60a href=&quot;#&quot; rel=&quot;country1&quot; class=&quot;selected&quot;&amp;#62Tab 1&amp;#60/a&amp;#62&amp;#60/li&amp;#62&lt;br /&gt;&amp;#60li&amp;#62&amp;#60a href=&quot;#&quot; rel=&quot;country2&quot;&amp;#62Tab 2&amp;#60/a&amp;#62&amp;#60/li&amp;#62&lt;br /&gt;&amp;#60li&amp;#62&amp;#60a href=&quot;#&quot; rel=&quot;country3&quot;&amp;#62Tab 3&amp;#60/a&amp;#62&amp;#60/li&amp;#62&lt;br /&gt;&amp;#60li&amp;#62&amp;#60a href=&quot;#&quot; rel=&quot;country4&quot;&amp;#62Tab 4&amp;#60/a&amp;#62&amp;#60/li&amp;#62&lt;br /&gt;&amp;#60li&amp;#62&amp;#60a href=&quot;http://www.dynamicdrive.com&quot;&amp;#62Dynamic Drive&amp;#60/a&amp;#62&amp;#60/li&amp;#62&lt;br /&gt;&amp;#60/ul&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60div style=&quot;border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px&quot;&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60div id=&quot;country1&quot; class=&quot;tabcontent&quot;&amp;#62&lt;br /&gt;Tab content 1 here&amp;#60br /&amp;#62Tab content 1 here&amp;#60br /&amp;#62&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60div id=&quot;country2&quot; class=&quot;tabcontent&quot;&amp;#62&lt;br /&gt;Tab content 2 here&amp;#60br /&amp;#62Tab content 2 here&amp;#60br /&amp;#62&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60div id=&quot;country3&quot; class=&quot;tabcontent&quot;&amp;#62&lt;br /&gt;Tab content 3 here&amp;#60br /&amp;#62Tab content 3 here&amp;#60br /&amp;#62&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60div id=&quot;country4&quot; class=&quot;tabcontent&quot;&amp;#62&lt;br /&gt;Tab content 4 here&amp;#60br /&amp;#62Tab content 4 here&amp;#60br /&amp;#62&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60script type=&quot;text/javascript&quot;&amp;#62&lt;br /&gt;&lt;br /&gt;var countries=new ddtabcontent(&quot;countrytabs&quot;)&lt;br /&gt;countries.setpersist(true)&lt;br /&gt;countries.setselectedClassTarget(&quot;link&quot;) //&quot;link&quot; or &quot;linkparent&quot;&lt;br /&gt;countries.init()&lt;br /&gt;&lt;br /&gt;&amp;#60/script&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60p&amp;#62&amp;#60b&amp;#62&amp;#60a href=&quot;javascript:countries.expandit(3)&quot;&amp;#62Click here to select last tab&amp;#60/a&amp;#62&amp;#60/b&amp;#62&amp;#60/p&amp;#62&lt;br /&gt; &amp;#60/body&amp;#62&lt;br /&gt; &amp;#60/html&amp;#62&lt;br /&gt;&lt;br /&gt;To download the js and the css please click on the below link&lt;br /&gt;&lt;a href=&quot;http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm&quot;&gt;Click here&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/950904823467521790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/tabs-using-javascript_23.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/950904823467521790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/950904823467521790'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/tabs-using-javascript_23.html' title='Tabs using javascript'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-5462142729806928652</id><published>2009-03-23T12:46:00.000-07:00</published><updated>2009-03-23T12:53:58.277-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tabs in html"/><title type='text'>Tabs using javascript</title><content type='html'>Here is an example to how to create a tab control in html using the div tag and the javascript&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#60script type=&quot;text/javascript&quot; language=&quot;JavaScript&quot;&amp;#62&amp;#60!--&lt;br /&gt;function ManageTabPanelDisplay() {&lt;br /&gt;//&lt;br /&gt;// Between the parenthesis, list the id&#39;s of the div&#39;s that &lt;br /&gt;//     will be affected when tabs are clicked. List in any &lt;br /&gt;//     order. Put the id&#39;s in single quotes (apostrophes) &lt;br /&gt;//     and separate them with a comma -- all one line.&lt;br /&gt;//&lt;br /&gt;var idlist = new Array(&#39;tab1focus&#39;,&#39;tab2focus&#39;,&#39;tab3focus&#39;,&#39;tab1ready&#39;,&#39;tab2ready&#39;,&#39;tab3ready&#39;,&#39;content1&#39;,&#39;content2&#39;,&#39;content3&#39;);&lt;br /&gt;&lt;br /&gt;// No other customizations are necessary.&lt;br /&gt;if(arguments.length &amp;#60 1) { return; }&lt;br /&gt;for(var i = 0; i &amp;#60 idlist.length; i++) {&lt;br /&gt;   var block = false;&lt;br /&gt;   for(var ii = 0; ii &amp;#60 arguments.length; ii++) {&lt;br /&gt;      if(idlist[i] == arguments[ii]) {&lt;br /&gt;         block = true;&lt;br /&gt;         break;&lt;br /&gt;         }&lt;br /&gt;      }&lt;br /&gt;   if(block) { document.getElementById(idlist[i]).style.display = &quot;block&quot;; }&lt;br /&gt;   else { document.getElementById(idlist[i]).style.display = &quot;none&quot;; }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;//--&amp;#62&amp;#60/script&amp;#62&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#60!-- Below is the CSS for the example tab panel div tags. &lt;br /&gt;     You may, of course, change these according to your &lt;br /&gt;     design requirements.&lt;br /&gt;&lt;br /&gt;     Refer to the Creating a Tab Panel article for notes &lt;br /&gt;     about this CSS. --&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60style type=&quot;text/css&quot;&amp;#62&lt;br /&gt;.tab { &lt;br /&gt; font-family: verdana,sans-serif; &lt;br /&gt; font-size: 14px;&lt;br /&gt; width: 100px;&lt;br /&gt; white-space: nowrap;&lt;br /&gt; text-align: center;&lt;br /&gt; border-style: solid;&lt;br /&gt; border-color: black;&lt;br /&gt; border-left-width: 1px;&lt;br /&gt; border-right-width: 1px;&lt;br /&gt; border-top-width: 1px;&lt;br /&gt; border-bottom-width: 0px;&lt;br /&gt; padding-top: 5px;&lt;br /&gt; padding-bottom: 5px;&lt;br /&gt; cursor: pointer;&lt;br /&gt; }&lt;br /&gt;.tabhold { &lt;br /&gt; background-color: white;&lt;br /&gt; color: black;&lt;br /&gt; }&lt;br /&gt;.tabfocus { &lt;br /&gt; background-color: black;&lt;br /&gt; color: white;&lt;br /&gt; }&lt;br /&gt;.tabcontent { &lt;br /&gt; font-family: sans-serif; &lt;br /&gt; font-size: 14px;&lt;br /&gt; width: 400px;&lt;br /&gt; height: 275px;&lt;br /&gt; border-style: solid;&lt;br /&gt; border-color: black;&lt;br /&gt; border-width: 1px;&lt;br /&gt; padding-top: 15px;&lt;br /&gt; padding-left: 10px;&lt;br /&gt; padding-right: 10px;&lt;br /&gt; }&lt;br /&gt;&amp;#60/style&amp;#62&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#60!-- Below is the example tab panel. Notes are embedded in &lt;br /&gt;     the HTML, and the Creating a Tab Panel article also &lt;br /&gt;     contains information. --&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&amp;#62&lt;br /&gt;&amp;#60tr&amp;#62&lt;br /&gt;&amp;#60td&amp;#62&lt;br /&gt;&amp;#60div id=&quot;tab1focus&quot; class=&quot;tab tabfocus&quot; style=&quot;display:block;&quot;&amp;#62&lt;br /&gt;Tab1&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&amp;#60div id=&quot;tab1ready&quot; class=&quot;tab tabhold&quot; style=&quot;display:none;&quot;&amp;#62&lt;br /&gt;&amp;#60!-- Between the parenthesis, provide a list of ids that are to &lt;br /&gt;     be visible when this tab is clicked. The ids are between &lt;br /&gt;     single quotes (apostrophes) and separated with a comma. --&amp;#62&lt;br /&gt;&amp;#60span onclick=&quot;ManageTabPanelDisplay(&#39;tab1focus&#39;,&#39;tab2ready&#39;,&#39;tab3ready&#39;,&#39;content1&#39;)&quot;&amp;#62Tab1&amp;#60/span&amp;#62&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&amp;#60/td&amp;#62&amp;#60td width=&quot;20&quot;&amp;#62 &amp;#60/td&amp;#62&amp;#60td&amp;#62&lt;br /&gt;&amp;#60div id=&quot;tab2focus&quot; class=&quot;tab tabfocus&quot; style=&quot;display:none;&quot;&amp;#62&lt;br /&gt;Tab2&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&amp;#60div id=&quot;tab2ready&quot; class=&quot;tab tabhold&quot; style=&quot;display:block;&quot;&amp;#62&lt;br /&gt;&amp;#60!-- Between the parenthesis, provide a list of ids that are to &lt;br /&gt;     be visible when this tab is clicked. The ids are between &lt;br /&gt;     single quotes (apostrophes) and separated with a comma. --&amp;#62&lt;br /&gt;&amp;#60span onclick=&quot;ManageTabPanelDisplay(&#39;tab1ready&#39;,&#39;tab2focus&#39;,&#39;tab3ready&#39;,&#39;content2&#39;)&quot;&amp;#62Tab2&amp;#60/span&amp;#62&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&amp;#60/td&amp;#62&amp;#60td width=&quot;20&quot;&amp;#62 &amp;#60/td&amp;#62&amp;#60td&amp;#62&lt;br /&gt;&amp;#60div id=&quot;tab3focus&quot; class=&quot;tab tabfocus&quot; style=&quot;display:none;&quot;&amp;#62&lt;br /&gt;Tab3&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&amp;#60div id=&quot;tab3ready&quot; class=&quot;tab tabhold&quot; style=&quot;display:block;&quot;&amp;#62&lt;br /&gt;&amp;#60!-- Between the parenthesis, provide a list of ids that are to &lt;br /&gt;     be visible when this tab is clicked. The ids are between &lt;br /&gt;     single quotes (apostrophes) and separated with a comma. --&amp;#62&lt;br /&gt;&amp;#60span onclick=&quot;ManageTabPanelDisplay(&#39;tab1ready&#39;,&#39;tab2ready&#39;,&#39;tab3focus&#39;,&#39;content3&#39;)&quot;&amp;#62Tab3&amp;#60/span&amp;#62&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&amp;#60/td&amp;#62&amp;#60td width=&quot;180&quot;&amp;#62 &amp;#60/td&amp;#62&amp;#60td&amp;#62&lt;br /&gt;&amp;#60/tr&amp;#62&lt;br /&gt;&amp;#60tr&amp;#62&lt;br /&gt;&amp;#60td colspan=&quot;6&quot;&amp;#62&lt;br /&gt;&amp;#60div id=&quot;content1&quot; class=&quot;tabcontent&quot; style=&quot;display:block;&quot;&amp;#62&lt;br /&gt;&amp;#60p style=&quot;margin-top:0px&quot;&amp;#62&lt;br /&gt;This is the first tab&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt;&amp;#60p&amp;#62&lt;br /&gt;This tab is generated for the first tab data. Here you can have any data related to the first tab&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt;&amp;#60p&amp;#62&lt;br /&gt;WE can also have a paragraph of data, if we want to it to be &lt;br /&gt;dynamically we need to concentrate more on this&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt;&amp;#60p&amp;#62&lt;br /&gt;blah................&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt;&amp;#60p style=&quot;margin-bottom:0px&quot;&amp;#62&lt;br /&gt;Tab1 sucessfully done&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&amp;#60div id=&quot;content2&quot; class=&quot;tabcontent&quot; style=&quot;display:none;&quot;&amp;#62&lt;br /&gt;&amp;#60p style=&quot;margin-top:0px&quot;&amp;#62&lt;br /&gt; Hello everyone Now testing the contect2&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt;&amp;#60p&amp;#62&lt;br /&gt;This software is one of the most sophisticated form handlers available &lt;br /&gt;on the Internet. Yet, it is easy to implement.&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt;&amp;#60p&amp;#62&lt;br /&gt;And it has anti-hijacking code built right in.&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt;&amp;#60p&amp;#62&lt;br /&gt;The software also helps spam-proof your web site so email &lt;br /&gt;harvesting robots find nothing when they crawl your site.&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt;&amp;#60p style=&quot;margin-bottom:0px&quot;&amp;#62&lt;br /&gt;This is the sampel test program use this for the further resiults&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&amp;#60div id=&quot;content3&quot; class=&quot;tabcontent&quot; style=&quot;display:none;&quot;&amp;#62&lt;br /&gt;&amp;#60div style=&quot;margin: 0px 20px 10px 0px; width: 80px; height: 105px; float: left;&quot;&amp;#62Third tab test data&amp;#60/div&amp;#62&lt;br /&gt;&amp;#60p style=&quot;margin-top:0px&quot;&amp;#62&lt;br /&gt;test data you can write anything here.&lt;br /&gt; test datatest datatest datatest datatest data....... THis is the third tab&lt;br /&gt;&amp;#60p&amp;#62&lt;br /&gt;I noticed unusual activity on the server and determined a script &lt;br /&gt;was being used to send spam. Quickly, I replaced that script with one that would &lt;br /&gt;record everything sent to it but would not send email.&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt;&amp;#60p&amp;#62&lt;br /&gt;During the hijacking, which continued for hours, I developed and tweaked code to &lt;br /&gt;block that very thing.&amp;#60!-- The code was developed and tested and tweaked and tested &lt;br /&gt;again, using the live hijacking to measure effectiveness.--&amp;#62&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt;&amp;#60p&amp;#62&lt;br /&gt;Get some peace of mind. Get this&lt;br /&gt;&amp;#60/p&amp;#62&lt;br /&gt; &lt;br /&gt;&amp;#60/div&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60/td&amp;#62&amp;#60/tr&amp;#62&lt;br /&gt;&amp;#60/table&amp;#62</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/5462142729806928652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/tabs-using-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/5462142729806928652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/5462142729806928652'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/tabs-using-javascript.html' title='Tabs using javascript'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-8908388011307891868</id><published>2009-03-21T11:48:00.001-07:00</published><updated>2009-03-21T11:54:48.566-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Radio button"/><title type='text'>Javascript radio button validation</title><content type='html'>In the form we need to like to have a scenario where we need to write a java script code for checking whether we need the radio has been selected or not?&lt;br /&gt;&lt;br /&gt;The below example tells you to how to write a JavaScript for checking the radio button is checked or not.&lt;br /&gt;&lt;br /&gt;&amp;#60html&amp;#62&lt;br /&gt;&amp;#60head&amp;#62&lt;br /&gt;&amp;#60script language=&quot;javascript&quot;&amp;#62&lt;br /&gt;function GetSelectedItem() {&lt;br /&gt;&lt;br /&gt;chosen = &quot;&quot;&lt;br /&gt;len = document.f1.r1.length&lt;br /&gt;&lt;br /&gt;for (i = 0; i &amp;#60len; i++) {&lt;br /&gt;if (document.f1.r1[i].checked) {&lt;br /&gt;chosen = document.f1.r1[i].value&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (chosen == &quot;&quot;) {&lt;br /&gt;alert(&quot;No Location Chosen&quot;);&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;alert(chosen)&lt;br /&gt;return true;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&amp;#60/script&amp;#62&lt;br /&gt;&amp;#60/head&amp;#62&lt;br /&gt;&amp;#60body&amp;#62&lt;br /&gt;&amp;#60form name=&quot;f1&quot; action=&quot;&quot; onsubmit=&quot;return GetSelectedItem();&quot;&amp;#62&lt;br /&gt;&amp;#60Input type =&quot;radio&quot; Name =&quot;r1&quot; Value = &quot;NE&quot;&amp;#62North East&lt;br /&gt;&amp;#60Input type = &quot;radio&quot; Name = &quot;r1&quot; Value = &quot;NW&quot;&amp;#62North West&lt;br /&gt;&amp;#60Input type = &quot;radio&quot; Name = &quot;r1&quot; Value = &quot;SE&quot;&amp;#62South East&lt;br /&gt;&amp;#60Input type = &quot;radio&quot; Name = &quot;r1&quot; Value = &quot;SW&quot;&amp;#62South West&lt;br /&gt;&amp;#60Input type = &quot;radio&quot; Name = &quot;r1&quot; Value = &quot;midlands&quot;&amp;#62Midlands&lt;br /&gt;&amp;#60input type=&quot;submit&quot; value=&quot;submit&quot;&amp;#62&lt;br /&gt;&amp;#60/form&amp;#62&lt;br /&gt;&amp;#60/body&amp;#62&lt;br /&gt;&amp;#60/html&amp;#62&lt;br /&gt;&lt;br /&gt;Here we have a javascript method GetSelectedItem() which will be invoked when a submit button is pressed. document.f1.r1.length will tells the length of the radio buttons present. The for loop will check all the radio buttons and find if even a single radio button is checked or not.</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/8908388011307891868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/javascript-radio-button-validation.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/8908388011307891868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/8908388011307891868'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/javascript-radio-button-validation.html' title='Javascript radio button validation'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-5520979174815764283</id><published>2009-03-20T13:21:00.000-07:00</published><updated>2009-03-20T13:25:18.998-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Building a clock in Javascript</title><content type='html'>Clocks are one obvious application of timing loops.Below is the code for displaying a watch in a website using javascript&lt;br /&gt;&lt;br /&gt;&amp;#60html&amp;#62&amp;#60head&amp;#62&amp;#60title&amp;#62A JavaScript Clock&amp;#60/title&amp;#62&lt;br /&gt;&amp;#60script type = &quot;text/javascript&quot;&amp;#62&lt;br /&gt;&amp;#60!-- hide me from older browsers&lt;br /&gt;  var the_timeout;&lt;br /&gt;function writeTime() {&lt;br /&gt;// get a Date object&lt;br /&gt;  var today = new Date();&lt;br /&gt;// ask the object for some information&lt;br /&gt; var hours = today.getHours();&lt;br /&gt;var minutes = today.getMinutes();&lt;br /&gt;var seconds = today.getSeconds();&lt;br /&gt;// make the minutes and seconds look right&lt;br /&gt;  minutes = fixTime(minutes);&lt;br /&gt;seconds = fixTime(seconds);&lt;br /&gt;// put together the time string and write it out&lt;br /&gt;  var the_time = hours + &quot;:&quot; + minutes + &quot;:&quot; + seconds;&lt;br /&gt;  window.document.the_form.the_text.value = the_time;&lt;br /&gt;// run this function again in a second&lt;br /&gt;  the_timeout = setTimeout(&#39;writeTime();&#39;,1000);&lt;br /&gt;}&lt;br /&gt;  function fixTime(the_time) {&lt;br /&gt;if (the_time &amp;#60 10)&lt;br /&gt;{&lt;br /&gt;the_time = &quot;0&quot; + the_time;&lt;br /&gt;}&lt;br /&gt;return the_time;&lt;br /&gt;}&lt;br /&gt;// show me --&amp;#62&lt;br /&gt;&amp;#60/script&amp;#62&lt;br /&gt;&amp;#60/head&amp;#62&lt;br /&gt;&amp;#60body onload=&quot;writeTime();&quot;&amp;#62&lt;br /&gt;The time is now:&lt;br /&gt;&amp;#60form name = &quot;the_form&quot;&amp;#62&lt;br /&gt;&amp;#60input type = &quot;text&quot; name = &quot;the_text&quot;&amp;#62&lt;br /&gt;&amp;#60input type = &quot;button&quot; value = &quot;Start the Clock&quot; onClick = &quot;writeTime();&quot;&amp;#62&lt;br /&gt;&amp;#60input type = &quot;button&quot; value = &quot;Stop the Clock&quot;&lt;br /&gt;onClick = &quot;clearTimeout(the_timeout);&quot;&amp;#62&lt;br /&gt;&amp;#60/form&amp;#62&lt;br /&gt;&amp;#60/body&amp;#62&lt;br /&gt;&amp;#60/html&amp;#62&lt;br /&gt;&lt;br /&gt;The heart of script is the writeTime() function.Every second, this function figures out the current time, puts the time in the text field, and then sets a time-out to run writeTime() a second later.&lt;br /&gt;                           the script starts by declaring the variable that will hold the timeouts. Next comes the writeTime() function, which creates a new Date&lt;br /&gt;object in (remember that a new Date object holds the current date and time). Line and the two lines following it get the hours, minutes, and seconds from the Date object using the getHours(), getMinutes(), and getSeconds() methods.&lt;br /&gt;you’ll see that getMinutes() and getSeconds() each return an integer from 1 to 59. If it’s two minutes and three seconds past 9 AM, the variable hours in  will be 9, minutes will be 2, and seconds will be 3. But putting these numbers together to display the time would create the string 9:2:3 instead of 9:02:03. Line takes care of this little problem by sending the minutes and seconds variables to a function I’ve written called fixTime(). The fixTime() function in takes a number as its parameter and puts 0 before the number if it is less than 10 (so 2 becomes 02). Make sure you understand how the fixTime() and writeTime() functions work together.&lt;br /&gt;&lt;br /&gt;Once fixTime() fixes the minutes and the seconds by inserting zero where appropriate, creates the time string, and writes it into the text box. Finally, sets the time-out that will call writeTime() again in one second. When writeTime() is called again, it creates a new Date object, gets the information out of it, fixes the minutes and seconds if necessary, writes the new time into the text box, and sets the time-out again. The whole process starts when a visitor clicks the Start the Clock button and ends when the visitor clicks the Stop the Clock button, which cancels the most recently set time-out.</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/5520979174815764283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/building-clock-in-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/5520979174815764283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/5520979174815764283'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/building-clock-in-javascript.html' title='Building a clock in Javascript'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-3562056510995623667</id><published>2009-03-20T12:29:00.000-07:00</published><updated>2009-03-20T12:45:38.832-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Creating arrays in javascript</title><content type='html'>Arrays are so handy that you’ll often want to create your own.for example, A phone book is an array of names and phone numbers. You can think of a survey as an array of questions; an array can also store the answers a visitor enters. A slide show is an array of pictures shown in sequence.&lt;br /&gt;&lt;br /&gt;JavaScript lets you create your own arrays. If you know what&lt;br /&gt;you want to store in the array when you create it, use a line like the following:&lt;br /&gt;&lt;br /&gt;Array Declaration:&lt;br /&gt;var colors =new Array(&quot;red&quot;, &quot;orange&quot;, &quot;yellow&quot;, &quot;green&quot;, &quot;blue&quot;, &quot;indigo&quot;, &quot;violet&quot;);&lt;br /&gt;&lt;br /&gt;This line creates a variable called rainbow_colors that stores an array of colors.&lt;br /&gt;The words new Array() tell JavaScript to create a new Array object.To put values in your new array, simply list them in the parentheses.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#60html&amp;#62&lt;br /&gt;&amp;#60head&amp;#62&lt;br /&gt;&amp;#60title&amp;#62Strobe&amp;#60/title&amp;#62&lt;br /&gt;&amp;#60script type = &quot;text/javascript&quot;&amp;#62&lt;br /&gt; &lt;br /&gt;function strobeIt()&lt;br /&gt;{&lt;br /&gt; var colors =&lt;br /&gt;new Array(&quot;red&quot;, &quot;orange&quot;, &quot;yellow&quot;, &quot;green&quot;, &quot;blue&quot;, &quot;indigo&quot;, &quot;violet&quot;);&lt;br /&gt;var index = 0;&lt;br /&gt; while (index &lt; rainbow_colors.length)&lt;br /&gt;{&lt;br /&gt; window.document.bgColor = colors[index];&lt;br /&gt; index++;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&amp;#60/script&amp;#62&lt;br /&gt;&amp;#60/head&amp;#62&lt;br /&gt;&amp;#60body&amp;#62&lt;br /&gt;&amp;#60form&amp;#62&lt;br /&gt;&amp;#60input type = &quot;button&quot; value = &quot;strobe&quot; onClick = &quot;strobeIt();&quot;&amp;#62&lt;br /&gt;&amp;#60/form&amp;#62&lt;br /&gt;&amp;#60/body&amp;#62&lt;br /&gt;&amp;#60/html&amp;#62&lt;br /&gt;&lt;br /&gt;creates the array and sets up the loop, saying, “While index is less than the number of items in the array, execute the JavaScript between the curly brackets.” The first time through the loop, index is 0, so when looks up rainbow_colors[index], it gets the first item in the array, the value red. Line assigns this value to window.document.bgColor, which sets the background color to red. Once the script has set this color, adds 1 to index, and the loop begins again. Next time through, index will be 1, so will make the background color orange, then adds 1 to index, making it 2, and back through the loop we go. If you have a very fast computer, the background&lt;br /&gt;may strobe too quickly for you to see it. In this case, add a few more colors&lt;br /&gt;to the array in.</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/3562056510995623667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/creating-arrays-in-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/3562056510995623667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/3562056510995623667'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/creating-arrays-in-javascript.html' title='Creating arrays in javascript'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-7792568811668119322</id><published>2009-03-19T00:28:00.000-07:00</published><updated>2009-03-19T00:45:08.160-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Calenders in Javascript</title><content type='html'>&lt;span style=&quot;font-weight:bold;&quot;&gt;The “Coolest” DHTML Calendar:&lt;/span&gt;&lt;br /&gt;This tool is easy to use and is well documented. It has several high quality color themes and it&#39;s translated into a lot of languages.Easy to use in our websites. In the downloaded files each and everything is clearly explained with an example for further understanding.&lt;br /&gt;&lt;br /&gt;Download link is:&lt;br /&gt;                  &lt;a href=&quot;http://www.dynarch.com/static/jscalendar-1.0.zip&quot;&gt;Downloalink&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Download this files and use in your website. I found is very usefull, Hope for youalso</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/7792568811668119322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/calenders-in-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/7792568811668119322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/7792568811668119322'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/calenders-in-javascript.html' title='Calenders in Javascript'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-39936788417190182.post-7554263483465097446</id><published>2009-03-16T00:30:00.000-07:00</published><updated>2009-03-16T00:42:19.277-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Menu list"/><title type='text'>Javascript Menu List</title><content type='html'>In the below example we have a two list boxes where we can transfer one list box value to another list box. and vice verse. I found this useful when creating a distribution list where you have a set of people available to go into that list.&lt;br /&gt;&lt;br /&gt;&amp;#60html&amp;#62&lt;br /&gt;&amp;#60head&amp;#62&lt;br /&gt;&amp;#60script language=&quot;JavaScript&quot;&amp;#62&lt;br /&gt;&amp;#60!--&lt;br /&gt;&lt;br /&gt;function one2two() {&lt;br /&gt;    m1len = m1.length ;&lt;br /&gt;    for ( i=0; i&amp;#60m1len ; i++){&lt;br /&gt;        if (m1.options[i].selected == true ) {&lt;br /&gt;            m2len = m2.length;&lt;br /&gt;            m2.options[m2len]= new Option(m1.options[i].text);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    for ( i = (m1len -1); i&amp;#62=0; i--){&lt;br /&gt;        if (m1.options[i].selected == true ) {&lt;br /&gt;            m1.options[i] = null;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function two2one() s{&lt;br /&gt;    m2len = m2.length ;&lt;br /&gt;        for ( i=0; i&amp;#60m2len ; i++){&lt;br /&gt;            if (m2.options[i].selected == true ) {&lt;br /&gt;                m1len = m1.length;&lt;br /&gt;                m1.options[m1len]= new Option(m2.options[i].text);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        for ( i=(m2len-1); i&amp;#62=0; i--) {&lt;br /&gt;            if (m2.options[i].selected == true ) {&lt;br /&gt;                m2.options[i] = null;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//--&amp;#62&lt;br /&gt;&amp;#60/script&amp;#62&lt;br /&gt;&amp;#60/head&amp;#62&lt;br /&gt;&amp;#60body&amp;#62&lt;br /&gt;form method=&quot;post&quot; name=&quot;theForm&quot;&amp;#62&lt;br /&gt;&amp;#60table align=&quot;center&quot; bgcolor=&quot;white&quot; border=&quot;1&quot; cellpadding=&quot;10&quot; cellspacing=&quot;0&quot;&amp;#62&lt;br /&gt;&amp;#60tbody&amp;#62&amp;#60tr&amp;#62&amp;#60td align=&quot;center&quot;&amp;#62&lt;br /&gt;    &amp;#60select name=&quot;menu1&quot; size=&quot;10&quot; multiple=&quot;multiple&quot;&amp;#62&lt;br /&gt;         &amp;#60option&amp;#62Menu Item 2&amp;#60/option&amp;#62&lt;br /&gt;  &amp;#60option&amp;#62Menu Item 3&amp;#60/option&amp;#62&lt;br /&gt;  &amp;#60option&amp;#62Menu Item 5&amp;#60/option&amp;#62&lt;br /&gt;     &amp;#60/select&amp;#62&amp;#60br&amp;#62&lt;br /&gt;    &amp;#60p align=&quot;center&quot;&amp;#62&amp;#60input onclick=&quot;one2two()&quot; value=&quot; &amp;gt;&amp;gt; &quot; type=&quot;button&quot;&amp;#62&amp;#60/p&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60/td&amp;#62&amp;#60td align=&quot;center&quot;&amp;#62&lt;br /&gt;&lt;br /&gt;    &amp;#60select name=&quot;menu2&quot; size=&quot;10&quot; multiple=&quot;multiple&quot;&amp;#62&lt;br /&gt;    &amp;#60option&amp;#62Menu Item 6&amp;#60/option&amp;#62&lt;br /&gt;    &amp;#60option&amp;#62Menu Item 4&amp;#60/option&amp;#62&lt;br /&gt;    &amp;#60option&amp;#62Menu Item 1&amp;#60/option&lt;br /&gt;    &amp;#60/select&amp;#62&amp;#60br&amp;#62&lt;br /&gt;    &amp;#60p align=&quot;center&quot;&amp;#62&amp;#60input onclick=&quot;two2one()&quot; value=&quot; &amp;lt;&amp;lt; &quot; type=&quot;button&quot;&amp;#62&amp;#60/p&amp;#62&lt;br /&gt;&lt;br /&gt;&amp;#60/td&amp;#62&amp;#60/tr&amp;#62&amp;#60/tbody&amp;#62&amp;#60/table&amp;#62&lt;br /&gt;&amp;#60/form&amp;#62&lt;br /&gt;&amp;#60/body&amp;#62&lt;br /&gt;&amp;#60/html&amp;#62</content><link rel='replies' type='application/atom+xml' href='http://javascriptsolutions.blogspot.com/feeds/7554263483465097446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/javascript-menu-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/7554263483465097446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/39936788417190182/posts/default/7554263483465097446'/><link rel='alternate' type='text/html' href='http://javascriptsolutions.blogspot.com/2009/03/javascript-menu-list.html' title='Javascript Menu List'/><author><name>ravikumar</name><uri>http://www.blogger.com/profile/04440859078979491225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>