<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6968184361069286825</id><updated>2011-08-06T16:38:34.383+05:30</updated><category term='string'/><category term='search'/><category term='event'/><category term='functions'/><category term='browser'/><category term='validation'/><category term='effect'/><title type='text'>JavaScriptConnect</title><subtitle type='html'>javascript connect help pepole to connect javascript codes.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-753361887242592536</id><published>2008-04-16T18:31:00.001+05:30</published><updated>2008-04-16T18:31:40.243+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>Convert integer to words</title><content type='html'>var units = new Array ("Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen");&lt;br /&gt;var tens = new Array ("Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety");&lt;br /&gt;&lt;br /&gt;function num(it) {&lt;br /&gt; var theword = "";&lt;br /&gt; var started;&lt;br /&gt; if (it&gt;999) return "Lots";&lt;br /&gt; if (it==0) return units[0];&lt;br /&gt; for (var i = 9; i &gt;= 1; i--){&lt;br /&gt;  if (it&gt;=i*100) {&lt;br /&gt;   theword += units[i];&lt;br /&gt;   started = 1;&lt;br /&gt;   theword += " hundred";&lt;br /&gt;   if (it!=i*100) theword += " and ";&lt;br /&gt;   it -= i*100;&lt;br /&gt;   i=0;&lt;br /&gt;  }&lt;br /&gt; };&lt;br /&gt; &lt;br /&gt; for (var i = 9; i &gt;= 2; i--){&lt;br /&gt;  if (it&gt;=i*10) {&lt;br /&gt;   theword += (started?tens[i-2].toLowerCase():tens[i-2]);&lt;br /&gt;   started = 1;&lt;br /&gt;   if (it!=i*10) theword += "-";&lt;br /&gt;   it -= i*10;&lt;br /&gt;   i=0&lt;br /&gt;  }&lt;br /&gt; };&lt;br /&gt; &lt;br /&gt; for (var i=1; i &lt; 20; i++) {&lt;br /&gt;  if (it==i) {&lt;br /&gt;   theword += (started?units[i].toLowerCase():units[i]);&lt;br /&gt;  }&lt;br /&gt; };&lt;br /&gt; return theword;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-753361887242592536?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/753361887242592536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=753361887242592536&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/753361887242592536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/753361887242592536'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2008/04/convert-integer-to-words.html' title='Convert integer to words'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-6345864478798279356</id><published>2008-04-16T18:28:00.002+05:30</published><updated>2008-04-16T18:30:17.061+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Javascript write &amp; read cookie</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Write Cookie&lt;/span&gt;&lt;br /&gt;if(hours != null)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;   expire = new Date((new Date()).getTime() + hours * 3600000);&lt;br /&gt;   expire = "; expires=" + expire.toGMTString();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;document.cookie = name + "=" + escape(value) + expire;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Read Cookie&lt;/span&gt;&lt;br /&gt;var cookieValue = "";&lt;br /&gt;&lt;br /&gt;  var search = name + "=";&lt;br /&gt;&lt;br /&gt;  if(document.cookie.length &gt; 0)&lt;br /&gt;&lt;br /&gt;  { &lt;br /&gt;&lt;br /&gt;    offset = document.cookie.indexOf(search);&lt;br /&gt;&lt;br /&gt;    if (offset != -1)&lt;br /&gt;&lt;br /&gt;    { &lt;br /&gt;&lt;br /&gt;      offset += search.length;&lt;br /&gt;&lt;br /&gt;      end = document.cookie.indexOf(";", offset);&lt;br /&gt;&lt;br /&gt;      if (end == -1) end = document.cookie.length;&lt;br /&gt;&lt;br /&gt;      cookieValue = unescape(document.cookie.substring(offset, end))&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-6345864478798279356?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/6345864478798279356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=6345864478798279356&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/6345864478798279356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/6345864478798279356'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2008/04/javascript-write-read-cookie.html' title='Javascript write &amp; read cookie'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-1019712768396695444</id><published>2007-06-15T13:28:00.000+05:30</published><updated>2007-06-15T13:29:14.726+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='event'/><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>checked and unchecked all checkbox value</title><content type='html'>function prepare(form_id) {&lt;br /&gt;var formblock;&lt;br /&gt;formblock= document.getElementById(form_id);&lt;br /&gt;forminputs = formblock.getElementsByTagName('input');&lt;br /&gt;return forminputs;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function select_all(formname,name, value) {&lt;br /&gt;forminputs = prepare(formname);&lt;br /&gt;for (i = 0; i &lt; forminputs.length; i++) {&lt;br /&gt;// regex here to check name attribute&lt;br /&gt;var regex = new RegExp(name, "i");&lt;br /&gt;if (regex.test(forminputs[i].getAttribute('name'))) {&lt;br /&gt;if (value == '1') {&lt;br /&gt;forminputs[i].checked = true;&lt;br /&gt;} else {&lt;br /&gt;forminputs[i].checked = false;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (window.addEventListener) {&lt;br /&gt;window.addEventListener("load", prepare, false);&lt;br /&gt;} else if (window.attachEvent) {&lt;br /&gt;window.attachEvent("onload", prepare)&lt;br /&gt;} else if (document.getElementById) {&lt;br /&gt;window.onload = prepare;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-1019712768396695444?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/1019712768396695444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=1019712768396695444&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/1019712768396695444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/1019712768396695444'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/06/checked-and-unchecked-all-checkbox.html' title='checked and unchecked all checkbox value'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-4668731118823515525</id><published>2007-05-17T18:54:00.000+05:30</published><updated>2007-05-17T18:55:38.174+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>redirect parent when freame is on</title><content type='html'>top.location.href='../member.php'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-4668731118823515525?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/4668731118823515525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=4668731118823515525&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/4668731118823515525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/4668731118823515525'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/redirect-parent-when-freame-is-on.html' title='redirect parent when freame is on'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-3750409964534641507</id><published>2007-05-13T10:46:00.000+05:30</published><updated>2007-05-13T10:47:03.136+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='effect'/><title type='text'>Maintaining Page Scroll Position</title><content type='html'>This is a small example how to maintain scroll position of the page/div during refresh with the help of several lines of javascript code:&lt;br /&gt;&lt;br /&gt;&lt; html&gt;&lt;br /&gt;&lt; title&gt;&lt; /title&gt;&lt;br /&gt;&lt; head&gt;&lt;br /&gt;&lt; script language="javascript"&gt;&lt;br /&gt;&lt;br /&gt;// function saves scroll position&lt;br /&gt;function fScroll(val)&lt;br /&gt;{&lt;br /&gt;    var hidScroll = document.getElementById('hidScroll');&lt;br /&gt;    hidScroll.value = val.scrollTop;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// function moves scroll position to saved value&lt;br /&gt;function fScrollMove(what)&lt;br /&gt;{&lt;br /&gt;    var hidScroll = document.getElementById('hidScroll');&lt;br /&gt;    document.getElementById(what).scrollTop = hidScroll.value;&lt;br /&gt;}&lt;br /&gt;&lt; /script&gt;&lt;br /&gt;&lt; /head&gt;&lt;br /&gt;&lt;br /&gt;&lt; body onload="fScrollMove('div_scroll');" onunload="document.forms(0).submit()";&gt;&lt;br /&gt;&lt; form&gt;&lt;br /&gt;&lt; input type="text" id="hidScroll" name="a"&gt;&lt; /br&gt;&lt;br /&gt;&lt; div id="div_scroll" onscroll="fScroll(this);" &lt;br /&gt;style="overflow:auto;height:100px;width:100px;"&gt;&lt;br /&gt;&lt;br /&gt;.. VERY LONG TEXT GOES HERE&lt;br /&gt;   &lt;br /&gt;&lt; /div&gt;&lt;br /&gt;&lt; /form&gt;&lt;br /&gt;&lt; /body&gt;&lt;br /&gt;&lt; /html&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The example is supposed to be cross-browser compatible. Enjoy :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-3750409964534641507?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/3750409964534641507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=3750409964534641507&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/3750409964534641507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/3750409964534641507'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/maintaining-page-scroll-position.html' title='Maintaining Page Scroll Position'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-5385800676748925767</id><published>2007-05-13T10:45:00.000+05:30</published><updated>2007-05-13T10:46:19.406+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Obtain Browser Capabilities Using Javascript (clientCaps)</title><content type='html'>The ideal way to obtain client browser capabilities information is from a client-side script. This method minimizes server round trips, frees up server resources, and, consequently, boosts performance. It also provides information about browser settings and user preferences that cannot be obtained in any other way. Code snippet below demonstrates how to obtain browser capabilities using javascript. Specifically - how to obtain connection type (cables, dial-up, ADSL) in Internet Explorer.&lt;br /&gt;&lt;br /&gt;&lt; html&gt;&lt;br /&gt;&lt; head&gt;&lt;br /&gt;&lt; script&gt;&lt;br /&gt;function my()&lt;br /&gt;{&lt;br /&gt;    var sVersion = oClientCaps.connectionType;&lt;br /&gt;    myText.innerHTML = "You are using " + sVersion;&lt;br /&gt;}&lt;br /&gt;&lt; /script&gt;&lt;br /&gt;&lt; /head&gt;&lt;br /&gt;&lt;br /&gt;&lt; body style="behavior:url(#default#clientCaps)" id="oClientCaps" onLoad="my();"&gt;&lt;br /&gt;&lt; div id="myText"&gt;&lt; /div&gt;&lt;br /&gt;&lt; /body&gt;&lt;br /&gt;&lt; /html&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-5385800676748925767?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/5385800676748925767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=5385800676748925767&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/5385800676748925767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/5385800676748925767'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/obtain-browser-capabilities-using.html' title='Obtain Browser Capabilities Using Javascript (clientCaps)'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-237857597243495222</id><published>2007-05-13T10:44:00.002+05:30</published><updated>2007-05-13T10:45:14.665+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='effect'/><title type='text'>Convert RGB Color to HTML Hex</title><content type='html'>HTML needs the RGB (Red, Green, Blue) values of color converted to Hex. Hex is basically just a compact way for a computer to store 16 different values in 1 character. When you use color on Web pages, you often have to take a color code that was generated in one program and convert it into the corresponding Hex value for a Web page. The small javascript function below demonstrates how to convert RGB values to hex string.&lt;br /&gt;&lt;br /&gt;function RGB2HTML(red, green, blue)&lt;br /&gt;{&lt;br /&gt;    var decColor = red + 256 * green + 65536 * blue;&lt;br /&gt;    return decColor.toString(16);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-237857597243495222?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/237857597243495222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=237857597243495222&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/237857597243495222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/237857597243495222'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/convert-rgb-color-to-html-hex.html' title='Convert RGB Color to HTML Hex'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-4601394948045926212</id><published>2007-05-13T10:44:00.001+05:30</published><updated>2007-05-13T10:44:41.939+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='event'/><title type='text'>Adjust iframe Size to Fit its Contents</title><content type='html'>Sometimes we put iframe on HTML page and we need to adjust iframe size to fit its contents (iframe source HTML can be very big) ... Below is a small example that demonstrates how to do it:&lt;br /&gt;&lt;br /&gt;&lt; html&gt;&lt;br /&gt;&lt; head&gt;&lt;br /&gt;&lt; title&gt;&lt; /title&gt;&lt;br /&gt;&lt; /head&gt;&lt;br /&gt;&lt;br /&gt;&lt; body&gt;&lt;br /&gt;&lt; iframe id="ifr" src="ifr.html"&gt;&lt; /iframe&gt;&lt; br /&gt;&lt;br /&gt;&lt; input type="button" onclick="document.getElementById('ifr').style.height =&lt;br /&gt;ifr.document.body.scrollHeight + 5" value="Ajust" /&gt;&lt;br /&gt;&lt;br /&gt;&lt; /body&gt;&lt;br /&gt;&lt; /html&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-4601394948045926212?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/4601394948045926212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=4601394948045926212&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/4601394948045926212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/4601394948045926212'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/adjust-iframe-size-to-fit-its-contents.html' title='Adjust iframe Size to Fit its Contents'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-7514810871089840250</id><published>2007-05-13T10:43:00.001+05:30</published><updated>2007-05-13T10:43:57.506+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>HowTo Delete Cookie Using Javascript</title><content type='html'>Usually server-side code on dynamic web pages is responsible to manage client cookies (store and delete them). However it is also possible to provide a certain control for cookie management from client code. This is a small javascript trick that demonstrates how to delete cookie using client code. Cookie simply is updated as expired and removed.&lt;br /&gt;&lt;br /&gt;&lt; html&gt;&lt;br /&gt;&lt; head&gt;&lt;br /&gt;&lt; title&gt;&lt; /title&gt;&lt;br /&gt;&lt; script language="Javascript"&gt;&lt;br /&gt;&lt;br /&gt;function loaded()&lt;br /&gt;{&lt;br /&gt;    document.cookie = "v0=1;";&lt;br /&gt;    document.cookie = "v1=2;";&lt;br /&gt;&lt;br /&gt;    alert(document.cookie);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function deletecook()&lt;br /&gt;{&lt;br /&gt;    var d = new Date();&lt;br /&gt;    document.cookie = "v0=1;expires=" + d.toGMTString() + ";" + ";";&lt;br /&gt;&lt;br /&gt;    alert(document.cookie);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt; /script&gt;&lt;br /&gt;&lt; /head&gt;&lt;br /&gt;&lt;br /&gt;&lt; body onload="loaded();"&gt;&lt;br /&gt;&lt; a href="javascript:deletecook();"&gt;delete cookie&lt; /a&gt;&lt;br /&gt;&lt; /body&gt;&lt;br /&gt;&lt; /html&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-7514810871089840250?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/7514810871089840250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=7514810871089840250&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/7514810871089840250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/7514810871089840250'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/howto-delete-cookie-using-javascript.html' title='HowTo Delete Cookie Using Javascript'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-1249181937194773464</id><published>2007-05-13T10:42:00.002+05:30</published><updated>2007-05-13T10:43:17.359+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='event'/><title type='text'>How to Close Browser Window (window.close()) Without Warning</title><content type='html'>Usually server-side code on dynamic web pages is responsible to manage client cookies (store and delete them). However it is also possible to provide a certain control for cookie management from client code. This is a small javascript trick that demonstrates how to delete cookie using client code. Cookie simply is updated as expired and removed.&lt;br /&gt;&lt;br /&gt;&lt; html&gt;&lt;br /&gt;&lt; head&gt;&lt;br /&gt;&lt; title&gt;&lt; /title&gt;&lt;br /&gt;&lt; script language="Javascript"&gt;&lt;br /&gt;&lt;br /&gt;function loaded()&lt;br /&gt;{&lt;br /&gt;    document.cookie = "v0=1;";&lt;br /&gt;    document.cookie = "v1=2;";&lt;br /&gt;&lt;br /&gt;    alert(document.cookie);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function deletecook()&lt;br /&gt;{&lt;br /&gt;    var d = new Date();&lt;br /&gt;    document.cookie = "v0=1;expires=" + d.toGMTString() + ";" + ";";&lt;br /&gt;&lt;br /&gt;    alert(document.cookie);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt; /script&gt;&lt;br /&gt;&lt; /head&gt;&lt;br /&gt;&lt;br /&gt;&lt; body onload="loaded();"&gt;&lt;br /&gt;&lt; a href="javascript:deletecook();"&gt;delete cookie&lt; /a&gt;&lt;br /&gt;&lt; /body&gt;&lt;br /&gt;&lt; /html&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-1249181937194773464?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/1249181937194773464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=1249181937194773464&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/1249181937194773464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/1249181937194773464'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/how-to-close-browser-window-windowclose.html' title='How to Close Browser Window (window.close()) Without Warning'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-8204665354232112270</id><published>2007-05-13T10:42:00.001+05:30</published><updated>2007-05-13T10:42:23.605+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='event'/><title type='text'>How To Change Browser Scrollbars Colors</title><content type='html'>Small javascript code snippet that demonstrates how to change browser scrollbars colors. Please pay attention to the correct scroll colors attributes names (so they can be accessed using javascript). Usually javascript naming standard is "camel-case".&lt;br /&gt;&lt;br /&gt;with(document.body.style)&lt;br /&gt;{&lt;br /&gt;    scrollbarDarkShadowColor = "0000FF";&lt;br /&gt;    scrollbar3dLightColor = "87CEFA";&lt;br /&gt;    scrollbarArrowColor = "0084ff";&lt;br /&gt;    scrollbarBaseColor = "0000FF";&lt;br /&gt;    scrollbarFaceColor = "000020";&lt;br /&gt;    scrollbarHighlightColor = "0000FF";&lt;br /&gt;    scrollbarShadowColor = "0000FF";&lt;br /&gt;    scrollbarTrackColor = "00008b";&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-8204665354232112270?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/8204665354232112270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=8204665354232112270&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/8204665354232112270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/8204665354232112270'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/how-to-change-browser-scrollbars-colors.html' title='How To Change Browser Scrollbars Colors'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-1105723897884314326</id><published>2007-05-13T10:41:00.001+05:30</published><updated>2007-05-13T10:41:48.061+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='string'/><title type='text'>Remove Upper Chars from String</title><content type='html'>Function in javascript that uses toUpperCase and removes all upper chars from the input string.&lt;br /&gt;&lt;br /&gt;function fRemoveUpperChars(src)&lt;br /&gt;{&lt;br /&gt;    var dst = "";&lt;br /&gt;    var c = "";&lt;br /&gt;&lt;br /&gt;    for (var i = 0; i &lt; src.length; i++)&lt;br /&gt;    {&lt;br /&gt;        c = src.charAt(i);&lt;br /&gt;        if (c != c.toUpperCase())&lt;br /&gt;        {&lt;br /&gt;            dst += c;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return dst;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-1105723897884314326?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/1105723897884314326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=1105723897884314326&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/1105723897884314326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/1105723897884314326'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/remove-upper-chars-from-string.html' title='Remove Upper Chars from String'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-405648685562631489</id><published>2007-05-13T10:40:00.001+05:30</published><updated>2007-05-13T10:40:45.837+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>Javascript Tip: Catch Browser Closing Event</title><content type='html'>Occasionally there is a need to catch browser closing event. The most elegant way to catch browsing closing event in IE is the following short script:&lt;br /&gt;&lt;br /&gt;&lt; html&gt; &lt;br /&gt;&lt; head&gt;&lt;br /&gt;&lt; title&gt;&lt; /title&gt;&lt;br /&gt;&lt; /head&gt;&lt;br /&gt;&lt;br /&gt;&lt; body onunload = "if (screenTop &gt; 9999) alert('Closing');"&gt;&lt;br /&gt;&lt;br /&gt;&lt; /body&gt; &lt;br /&gt;&lt; /html&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From which it is obvious what is usually happening to the closed windows. Enjoy :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-405648685562631489?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/405648685562631489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=405648685562631489&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/405648685562631489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/405648685562631489'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/javascript-tip-catch-browser-closing.html' title='Javascript Tip: Catch Browser Closing Event'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-2281352664423606721</id><published>2007-05-13T10:39:00.000+05:30</published><updated>2007-05-13T10:40:15.023+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>Javascript: How To Set Cursor to Textbox End</title><content type='html'>In order to set up a cursor to the end of the text box there are 2 choices:&lt;br /&gt;&lt;br /&gt;    * Use createTextRange method.&lt;br /&gt;    * Focus the field and then set value. &lt;--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;"The trick is to set the value of the element after setting the cursor. The cursor will then be moved with it as the new value is written and end up at the end..."&lt;br /&gt;&lt;br /&gt;&lt; html&gt;&lt;br /&gt;&lt; head&gt;&lt;br /&gt;&lt; title&gt;&lt; /title&gt;&lt;br /&gt;&lt; script language="javascript"&gt;&lt;br /&gt;function func()&lt;br /&gt;{&lt;br /&gt;    var t2 = document.getElementById("t2");&lt;br /&gt;    t2.focus(); &lt;br /&gt;    t2.value = t2.value; &lt;br /&gt;}&lt;br /&gt;&lt; /script&gt;&lt;br /&gt;&lt; /head&gt;&lt;br /&gt;&lt;br /&gt;&lt; body&gt;&lt;br /&gt;&lt; input type="text" id="t1" value="aa"&gt;&lt;br /&gt;&lt; br /&gt;&lt;br /&gt;&lt; input type="text" id="t2" value="bb"&gt;&lt;br /&gt;&lt; br /&gt;&lt;br /&gt;&lt; input type="button" id="b" value="Run" onclick="func();" /&gt;&lt;br /&gt;&lt; /body&gt;&lt;br /&gt;&lt; /html&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-2281352664423606721?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/2281352664423606721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=2281352664423606721&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/2281352664423606721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/2281352664423606721'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/javascript-how-to-set-cursor-to-textbox.html' title='Javascript: How To Set Cursor to Textbox End'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-4946623237331198762</id><published>2007-05-13T10:38:00.000+05:30</published><updated>2007-05-13T10:39:03.341+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='event'/><title type='text'>Javascript: Open Pop-Up at Center of Client Window</title><content type='html'>In javascript - window.open opens a pop-up that by default opens at random location of the window. Below is a javascript function that will open a pop-up in the center of the client window. Hope it may save many additional lines of javascript code.&lt;br /&gt;&lt;br /&gt;function windowOpener(windowHeight, windowWidth, windowName, windowUri)&lt;br /&gt;{&lt;br /&gt;    var centerWidth = (window.screen.width - windowWidth) / 2;&lt;br /&gt;    var centerHeight = (window.screen.height - windowHeight) / 2;&lt;br /&gt;&lt;br /&gt;    newWindow = window.open(windowUri, windowName, 'resizable=0,width=' + windowWidth + &lt;br /&gt;        ',height=' + windowHeight + &lt;br /&gt;        ',left=' + centerWidth + &lt;br /&gt;        ',top=' + centerHeight);&lt;br /&gt;&lt;br /&gt;    newWindow.focus();&lt;br /&gt;    return newWindow.name;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please notice parameters that are passed to window.open.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-4946623237331198762?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/4946623237331198762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=4946623237331198762&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/4946623237331198762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/4946623237331198762'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/javascript-open-pop-up-at-center-of.html' title='Javascript: Open Pop-Up at Center of Client Window'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-7340627665947028959</id><published>2007-05-13T10:36:00.001+05:30</published><updated>2007-05-13T10:36:46.477+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>Create Random Numbers &amp; Characters</title><content type='html'>function randomString() {&lt;br /&gt; var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";&lt;br /&gt; var string_length = 8;&lt;br /&gt; var randomstring = '';&lt;br /&gt; for (var i=0; i &lt; string_length; i++) {&lt;br /&gt;  var rnum = Math.floor(Math.random() * chars.length);&lt;br /&gt;  randomstring += chars.substring(rnum,rnum+1);&lt;br /&gt; }&lt;br /&gt; document.randform.randomfield.value = randomstring;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;form name="randform"&gt;&lt;br /&gt;&lt;input type="button" value="Create Random String" onClick="randomString();"&gt;&amp;nbsp;&lt;br /&gt;&lt;input type="text" name="randomfield" value=""&gt;&lt;br /&gt;&lt;/form&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-7340627665947028959?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/7340627665947028959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=7340627665947028959&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/7340627665947028959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/7340627665947028959'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/create-random-numbers-characters.html' title='Create Random Numbers &amp; Characters'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-3754661566568728710</id><published>2007-05-13T10:35:00.002+05:30</published><updated>2007-05-13T10:36:10.918+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>Display a Random Image</title><content type='html'>var imlocation = "images/";&lt;br /&gt; var currentdate = 0;&lt;br /&gt; var image_number = 0;&lt;br /&gt; function ImageArray (n) {&lt;br /&gt;   this.length = n;&lt;br /&gt;   for (var i =1; i &lt;= n; i++) {&lt;br /&gt;     this[i] = ' '&lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt; image = new ImageArray(3)&lt;br /&gt; image[0] = 'image1.gif'&lt;br /&gt; image[1] = 'image2.gif'&lt;br /&gt; image[2] = 'image3.gif'&lt;br /&gt; var rand = 60/image.length&lt;br /&gt; function randomimage() {&lt;br /&gt;  currentdate = new Date()&lt;br /&gt;  image_number = currentdate.getSeconds()&lt;br /&gt;  image_number = Math.floor(image_number/rand)&lt;br /&gt;  return(image[image_number])&lt;br /&gt; }&lt;br /&gt; document.write("&lt;img src='" + imlocation + randomimage()+ "'&gt;");&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;To Substitute Your Own Images&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Change the imlocation variable to show the correct location of your images.&lt;br /&gt;&lt;br /&gt;Swap the file names in the ImageArray() for your own.&lt;br /&gt;&lt;br /&gt;To use a different number of images, add each new image on a line of its own, following the same format. You also need to change the number in the ImageArray() to reflect the total number of images (remember to count the "zero"). For example:&lt;br /&gt;&lt;br /&gt;image = new ImageArray(5)&lt;br /&gt;image[0] = 'image1.gif'&lt;br /&gt;image[1] = 'image2.gif'&lt;br /&gt;image[2] = 'image3.gif'&lt;br /&gt;image[3] = 'image4.gif'&lt;br /&gt;image[4] = 'image5.gif'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-3754661566568728710?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/3754661566568728710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=3754661566568728710&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/3754661566568728710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/3754661566568728710'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/display-random-image.html' title='Display a Random Image'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-8849095076159682557</id><published>2007-05-13T10:35:00.001+05:30</published><updated>2007-05-13T10:35:30.363+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='event'/><title type='text'>Count Words Using JavaScript</title><content type='html'>To use this script, place the following code in the document head:&lt;br /&gt;&lt;br /&gt;function countWords(){&lt;br /&gt; document.form1.wordcount.value = document.form1.inputString.value.split(' ').length;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Place the following code in the document body:&lt;br /&gt;&lt;br /&gt;&lt;form name="form1" method="post"&gt;&lt;br /&gt;&lt;textarea name="inputString" cols="50" rows="4"&gt;Text to count&lt;/textarea&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;input type="button" name="Convert" value="Count Words" onClick="countWords();"&gt; &lt;br /&gt;&lt;input name="wordcount" type="text" value="" size="6"&gt;&lt;br /&gt;&lt;/form&gt;&lt;br /&gt;&lt;br /&gt;You can adapt this script to count words is whichever way you like. The important part is inputString.value.split(' ').length — this counts the spaces.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-8849095076159682557?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/8849095076159682557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=8849095076159682557&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/8849095076159682557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/8849095076159682557'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/count-words-using-javascript.html' title='Count Words Using JavaScript'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-6675498862554429946</id><published>2007-05-13T10:34:00.001+05:30</published><updated>2007-05-13T10:34:57.445+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='event'/><title type='text'>Add Text to a Textarea or Text Field</title><content type='html'>This page shows you to how to add (append) or replace text in a text area or text field. In the example below, the new text is entered in the left text area and added to the one on the right. We will also look at other options for acquiring the new text.&lt;br /&gt;&lt;br /&gt;Step 1 - Create Text Area(s)&lt;br /&gt;&lt;br /&gt;Use the following code to create the form and text areas. Modify the layout and names to suit your needs (but remember to change the function code as well if you do).&lt;br /&gt;&lt;br /&gt;&lt;form name="myform"&gt;&lt;br /&gt;&lt;table border="0" cellspacing="0" cellpadding="5"&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;textarea name="inputtext"&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;br /&gt;&lt;input type="radio" name="placement" value="append" checked&gt; Add to Existing Text&lt;br&gt;&lt;br /&gt;&lt;td&gt;&lt;p&gt;&lt;input type="radio" name="placement" value="replace"&gt; Replace Existing Text&lt;br&gt;&lt;br /&gt;&lt;input type="button" value="Add New Text" onClick="addtext();"&gt;&lt;/p&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;textarea name="outputtext"&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;/form&gt;&lt;br /&gt;&lt;br /&gt;Step 2 - Create Function&lt;br /&gt;&lt;br /&gt;Insert the following code into the page head:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function addtext() {&lt;br /&gt; var newtext = document.myform.inputtext.value;&lt;br /&gt; if (document.myform.placement[1].checked) {&lt;br /&gt;  document.myform.outputtext.value = "";&lt;br /&gt;  }&lt;br /&gt; document.myform.outputtext.value += newtext;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More Options&lt;br /&gt;&lt;br /&gt;To acquire the new text from something other than a text field, modify the newtext variable. For example:&lt;br /&gt;&lt;br /&gt;// Pre-defined text:&lt;br /&gt;var newtext = "This is the new text";&lt;br /&gt;// Drop-Menu:&lt;br /&gt;var newtext = myform.mymenu.options[myform.mymenu.selectedIndex].value;&lt;br /&gt;// Prompt:&lt;br /&gt;var newtext = prompt('Enter New Text Here:', '');&lt;br /&gt;&lt;br /&gt;If you don't need to ask the user whether to replace or append the text, use the following simplified function:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function addtext() {&lt;br /&gt; var newtext = document.myform.inputtext.value;&lt;br /&gt; document.myform.outputtext.value += newtext;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This example appends the new text to the existing text. To replace the existing text instead, remove the "+" sign.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-6675498862554429946?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/6675498862554429946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=6675498862554429946&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/6675498862554429946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/6675498862554429946'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/add-text-to-textarea-or-text-field.html' title='Add Text to a Textarea or Text Field'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-4380349232790079637</id><published>2007-05-13T10:33:00.002+05:30</published><updated>2007-05-13T10:34:06.664+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='event'/><title type='text'>Disable the Return Key</title><content type='html'>function stopRKey(evt) {&lt;br /&gt;var evt = (evt) ? evt : ((event) ? event : null);&lt;br /&gt;var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);&lt;br /&gt;if ((evt.keyCode == 13) &amp;&amp; (node.type=="text")) { return false; }&lt;br /&gt;}&lt;br /&gt;document.onkeypress = stopRKey;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-4380349232790079637?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/4380349232790079637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=4380349232790079637&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/4380349232790079637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/4380349232790079637'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/disable-return-key.html' title='Disable the Return Key'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-2532104546925993519</id><published>2007-05-13T10:33:00.001+05:30</published><updated>2007-05-13T10:33:32.714+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='search'/><title type='text'>How to Make a Search Form With Multiple Search Options</title><content type='html'>This page explains how to create a form like the one below, allowing the user to select which search engine they would like to use to perform a search.&lt;br /&gt;&lt;br /&gt;This method takes advantage of the query string used by most search engines. The query string is the part of the URL which normally comes after the question mark when a search is performed. For example, if you do a Google search for "Darth Vader", you will notice the URL in the address bar changes to something like:&lt;br /&gt;http://www.google.com/search?q=darth+vader&lt;br /&gt;There will probably be a bunch of other stuff as well, but this is the important part.&lt;br /&gt;&lt;br /&gt;The multi-choice search form works by taking the users' search terms and appending them to the URL of the selected search engine.&lt;br /&gt;&lt;br /&gt;Step 1 - List of Search Engine URLs&lt;br /&gt;&lt;br /&gt;First of all you need to decide which search engines to include. You can only use search engines which use query strings, so you must check each search engine to make sure they do this. It's not hard -all you have to do is perform a search and see what happens to the URL. If your search terms show up in the URL then you can use this search engine.&lt;br /&gt;&lt;br /&gt;Next, find out exactly how the query string is structured for each search engine. Perform a search, then copy the entire URL up to the point where the search terms appear. You will end up with a list looking something like this:&lt;br /&gt;&lt;br /&gt;http://www.google.com/search?q=&lt;br /&gt;http://www.altavista.com/web/results?q=&lt;br /&gt;http://www.dogpile.com/info.dogpl/search/web/&lt;br /&gt;http://search.yahoo.com/search?p=&lt;br /&gt;&lt;br /&gt;Step 2 - Search Form&lt;br /&gt;&lt;br /&gt;The code below makes up the search form. Copy this into your web page and insert the search URLs from your list as the option values, one search engine for each option.&lt;br /&gt;&lt;br /&gt;&lt;form name="searchform" onSubmit="return dosearch();"&gt;&lt;br /&gt;Search:&lt;br /&gt;&lt;select name="sengines"&gt;&lt;br /&gt;&lt;option value="http://www.google.com/search?q=" selected&gt;Google&lt;/option&gt;&lt;br /&gt;&lt;option value="http://www.altavista.com/web/results?q="&gt;Alta Vista&lt;/option&gt;&lt;br /&gt;&lt;option value="http://www.dogpile.com/info.dogpl/search/web/"&gt;Dogpile&lt;/option&gt;&lt;br /&gt;&lt;option value="http://search.yahoo.com/search?p="&gt;Yahoo!&lt;/option&gt;&lt;br /&gt;&lt;/select&gt;&lt;br /&gt;For:&lt;br /&gt;&lt;input type="text" name="searchterms"&gt;&lt;br /&gt;&lt;input type="submit" name="SearchSubmit" value="Search"&gt;&lt;br /&gt;&lt;/form&gt;&lt;br /&gt;&lt;br /&gt;Step 3 - JavaScript Function&lt;br /&gt;&lt;br /&gt;And finally, place the following javascript in the head of the page:&lt;br /&gt;&lt;br /&gt;function dosearch() {&lt;br /&gt;var sf=document.searchform;&lt;br /&gt;var submitto = sf.sengines.options[sf.sengines.selectedIndex].value + escape(sf.searchterms.value);&lt;br /&gt;window.location.href = submitto;&lt;br /&gt;return false;&lt;br /&gt;&lt;br /&gt;Note: To make the search results page open in a new window, replace the line&lt;br /&gt;window.location.href = submitto;&lt;br /&gt;with:&lt;br /&gt;window.open(submitto);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-2532104546925993519?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/2532104546925993519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=2532104546925993519&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/2532104546925993519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/2532104546925993519'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/how-to-make-search-form-with-multiple.html' title='How to Make a Search Form With Multiple Search Options'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-3914534067097170209</id><published>2007-05-13T10:32:00.001+05:30</published><updated>2007-05-13T10:32:47.971+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>Remove Spaces From a Text Field</title><content type='html'>This page shows you how to remove spaces from a text field. Any spaces entered by the user will be removed when they click anywhere outside the text field.&lt;br /&gt;&lt;br /&gt;function removeSpaces(string) {&lt;br /&gt;var tstring = "";&lt;br /&gt;string = '' + string;&lt;br /&gt;splitstring = string.split(" ");&lt;br /&gt;for(i = 0; i &lt; splitstring.length; i++)&lt;br /&gt;tstring += splitstring[i];&lt;br /&gt;return tstring;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-3914534067097170209?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/3914534067097170209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=3914534067097170209&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/3914534067097170209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/3914534067097170209'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/remove-spaces-from-text-field.html' title='Remove Spaces From a Text Field'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-4191125920762738831</id><published>2007-05-13T10:31:00.002+05:30</published><updated>2007-05-13T10:32:19.298+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>"Add to Favourites" Link</title><content type='html'>"Add to Favourites" Link&lt;br /&gt;&lt;br /&gt;Note: This option only works in Internet Explorer.&lt;br /&gt;&lt;br /&gt;To create a link which adds a specified page to the user's bookmarks, use the following code (change the URL and description to suit your needs)&lt;br /&gt;&lt;br /&gt;javascript:window.external.AddFavorite('http://phpconnect.blogspot.com','phpconnect')"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-4191125920762738831?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/4191125920762738831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=4191125920762738831&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/4191125920762738831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/4191125920762738831'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/add-to-favourites-link.html' title='&quot;Add to Favourites&quot; Link'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-1648041006953162916</id><published>2007-05-13T10:31:00.001+05:30</published><updated>2007-05-13T10:31:16.814+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>Print Page</title><content type='html'>window.print()&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-1648041006953162916?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/1648041006953162916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=1648041006953162916&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/1648041006953162916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/1648041006953162916'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/print-page.html' title='Print Page'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-5748529976642496439</id><published>2007-05-13T10:29:00.000+05:30</published><updated>2007-05-13T10:30:37.830+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>Reload Page</title><content type='html'>onClick="window.location.reload()" Reload Page&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-5748529976642496439?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/5748529976642496439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=5748529976642496439&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/5748529976642496439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/5748529976642496439'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/reload-page.html' title='Reload Page'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-1363736778666762498</id><published>2007-05-13T10:28:00.000+05:30</published><updated>2007-05-13T10:29:14.008+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>Make Your Web Page the User's Home Page</title><content type='html'>onClick="this.style.behavior='url(#default#homepage)';&lt;br /&gt;this.setHomePage('http://phpconnect.blogspot.com');"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-1363736778666762498?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/1363736778666762498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=1363736778666762498&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/1363736778666762498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/1363736778666762498'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/make-your-web-page-users-home-page.html' title='Make Your Web Page the User&apos;s Home Page'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-7697896572149763367</id><published>2007-05-13T10:27:00.002+05:30</published><updated>2007-05-13T10:28:30.315+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>How can we submit a form without a submit button?</title><content type='html'>document.form.submit()&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-7697896572149763367?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/7697896572149763367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=7697896572149763367&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/7697896572149763367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/7697896572149763367'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/how-can-we-submit-form-without-submit.html' title='How can we submit a form without a submit button?'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-522377058715508239</id><published>2007-05-13T10:27:00.001+05:30</published><updated>2007-05-13T10:27:30.016+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='effect'/><title type='text'>Slide Show Script</title><content type='html'>script&gt;&lt;br /&gt;var i = 0;&lt;br /&gt;gallery = Array();&lt;br /&gt;gallery[0] = "http://www.hibot.com/images/interesting/asiankid/mrbean.jpg";&lt;br /&gt;gallery[1] = "http://www.hibot.com/images/interesting/asiankid/shrek.jpg";&lt;br /&gt;gallery[2] = "http://www.hibot.com/images/interesting/asiankid/titanic.jpg";&lt;br /&gt;function nextImg() {&lt;br /&gt;i = (i &lt; (gallery.length-1)) ? i+1 : 0;&lt;br /&gt;document.galleryImage.src = gallery[i];&lt;br /&gt;}&lt;br /&gt;/script&gt;&lt;br /&gt;&lt;br /&gt;a href=javascript: onClick="nextImg()"&gt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-522377058715508239?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/522377058715508239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=522377058715508239&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/522377058715508239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/522377058715508239'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/slide-show-script.html' title='Slide Show Script'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-17742956943262989</id><published>2007-05-13T10:26:00.002+05:30</published><updated>2007-05-13T10:27:02.495+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='effect'/><title type='text'>Pause and Display</title><content type='html'>They use a timer, nothing fancy. Just view the source of the "search in&lt;br /&gt;progress" page and you'll note both the meta tag and a script to redirect&lt;br /&gt;after 4 seconds.&lt;br /&gt;&lt;br /&gt;META HTTP-EQUIV=Refresh CONTENT="4;&lt;br /&gt;URL=http://hotscripts. com/search/ 13979793. html"&gt;&lt;br /&gt;&lt;br /&gt;link href="http://hotscripts. com/style. css" rel="stylesheet" type="text/css" &gt;&lt;br /&gt;script&gt;&lt;br /&gt;&lt;br /&gt;script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-17742956943262989?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/17742956943262989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=17742956943262989&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/17742956943262989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/17742956943262989'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/pause-and-display.html' title='Pause and Display'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-4993731943060362780</id><published>2007-05-13T10:26:00.001+05:30</published><updated>2007-05-13T10:26:27.480+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='validation'/><title type='text'>validate email address using javascript</title><content type='html'>function isEMailAddr(elem) {&lt;br /&gt;var str = elem.value;&lt;br /&gt;//alert(str);&lt;br /&gt;var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;&lt;br /&gt;if (!str.match(re)) {&lt;br /&gt;//alert("false");&lt;br /&gt;//setTimeout("focusElement('" + elem.form.name + "', '" + elem.name + "')", 0);&lt;br /&gt;return 1;&lt;br /&gt;} else {&lt;br /&gt;//alert("true");&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-4993731943060362780?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/4993731943060362780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=4993731943060362780&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/4993731943060362780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/4993731943060362780'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/validate-email-address-using-javascript.html' title='validate email address using javascript'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-5124025093072099196</id><published>2007-05-13T10:25:00.002+05:30</published><updated>2007-05-13T10:26:08.991+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='validation'/><title type='text'>validate url using javascript</title><content type='html'>function isEMailAddr(elem) {&lt;br /&gt;var str = elem.value;&lt;br /&gt;//alert(str);&lt;br /&gt;var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;&lt;br /&gt;if (!str.match(re)) {&lt;br /&gt;//alert("false");&lt;br /&gt;//setTimeout("focusElement('" + elem.form.name + "', '" + elem.name + "')", 0);&lt;br /&gt;return 1;&lt;br /&gt;} else {&lt;br /&gt;//alert("true");&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-5124025093072099196?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/5124025093072099196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=5124025093072099196&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/5124025093072099196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/5124025093072099196'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/validate-url-using-javascript.html' title='validate url using javascript'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-2455497129264061739</id><published>2007-05-13T10:25:00.001+05:30</published><updated>2007-05-13T10:25:25.742+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='validation'/><title type='text'>checkbox validate</title><content type='html'>document.emailForm.agree.checked&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-2455497129264061739?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/2455497129264061739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=2455497129264061739&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/2455497129264061739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/2455497129264061739'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/checkbox-validate.html' title='checkbox validate'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-1950660139065001175</id><published>2007-05-13T10:24:00.002+05:30</published><updated>2007-05-13T10:25:01.494+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>go back using javascript</title><content type='html'>history.back();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-1950660139065001175?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/1950660139065001175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=1950660139065001175&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/1950660139065001175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/1950660139065001175'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/go-back-using-javascript.html' title='go back using javascript'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-123270468640795111</id><published>2007-05-13T10:24:00.001+05:30</published><updated>2007-05-13T10:24:40.825+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>limit textbox in javascript</title><content type='html'>function checkInput(data,obj,max){&lt;br /&gt;var result = true;&lt;br /&gt;if (obj.value.length &gt;= max){&lt;br /&gt;var stripped = obj.value.substring(0, max);&lt;br /&gt;document.getElementById(data).value = stripped;&lt;br /&gt;result = false;&lt;br /&gt;}&lt;br /&gt;if (window.event)&lt;br /&gt;window.event.returnValue = result;&lt;br /&gt;return result;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;onkeypress="checkInput('des',this,250)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-123270468640795111?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/123270468640795111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=123270468640795111&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/123270468640795111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/123270468640795111'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/limit-textbox-in-javascript.html' title='limit textbox in javascript'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968184361069286825.post-388878662344957017</id><published>2007-05-13T10:22:00.000+05:30</published><updated>2007-05-13T10:23:53.436+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='effect'/><title type='text'>show and hide used in tab panel</title><content type='html'>function ShowHideDiv(id)&lt;br /&gt;{&lt;br /&gt;if(id=="module_product_featured_list")&lt;br /&gt;{&lt;br /&gt;document.getElementById("module_product_featured_list").style.display = "block";&lt;br /&gt;document.getElementById("module_product_new_list").style.display = "none";&lt;br /&gt;document.getElementById("module_product_special_list").style.display = "none";&lt;br /&gt;}&lt;br /&gt;if(id=="module_product_new_list")&lt;br /&gt;{&lt;br /&gt;document.getElementById("module_product_new_list").style.display = "block";&lt;br /&gt;document.getElementById("module_product_featured_list").style.display = "none";&lt;br /&gt;document.getElementById("module_product_special_list").style.display = "none";&lt;br /&gt;}&lt;br /&gt;if(id=="module_product_special_list")&lt;br /&gt;{&lt;br /&gt;document.getElementById("module_product_special_list").style.display = "block";&lt;br /&gt;document.getElementById("module_product_featured_list").style.display = "none";&lt;br /&gt;document.getElementById("module_product_new_list").style.display = "none";&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968184361069286825-388878662344957017?l=javascriptconnect.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javascriptconnect.blogspot.com/feeds/388878662344957017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6968184361069286825&amp;postID=388878662344957017&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/388878662344957017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968184361069286825/posts/default/388878662344957017'/><link rel='alternate' type='text/html' href='http://javascriptconnect.blogspot.com/2007/05/show-and-hide-used-in-tab-panel.html' title='show and hide used in tab panel'/><author><name>phpconnect</name><uri>http://www.blogger.com/profile/00811570932046877041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
