<?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-4261674352424229410</id><updated>2011-07-07T23:17:53.958-07:00</updated><category term='jquery plugin'/><category term='article'/><category term='plugin'/><category term='ajax'/><category term='jquery menu'/><category term='tutorial'/><title type='text'>download javascript plugin</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://js-script.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4261674352424229410/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://js-script.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>js script</name><uri>http://www.blogger.com/profile/14822984061422817341</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>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4261674352424229410.post-232090244082693836</id><published>2010-01-24T07:26:00.000-08:00</published><updated>2010-01-24T07:34:46.982-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jquery plugin'/><title type='text'>jParallax by stephband</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_KD7nAngcRRw/S1xnra5B2FI/AAAAAAAAAAs/AU4HGwSjpUM/s1600-h/diagram_parallax.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 248px;" src="http://1.bp.blogspot.com/_KD7nAngcRRw/S1xnra5B2FI/AAAAAAAAAAs/AU4HGwSjpUM/s320/diagram_parallax.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5430329246352529490" /&gt;&lt;/a&gt;&lt;br /&gt;What does jParallax do?&lt;br /&gt;Diagram of parallax layers.&lt;br /&gt;&lt;br /&gt;jParallax turns a selected element into a 'window', or viewport, and all its children into absolutely positioned layers that can be seen through the viewport. These layers move in response to the mouse, and, depending on their dimensions (and options for layer initialisation), they move by different amounts, in a parallaxy kind of way.&lt;br /&gt;&lt;br /&gt;The diagram on the right illustrates what Parallax does to the html:&lt;br /&gt;&lt;br /&gt;&lt;ul id="parallax"&gt;&lt;br /&gt;  &lt;li&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Demo:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://webdev.stephband.info/parallax_demos.html"&gt;demo 1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://webdev.stephband.info/parallax_demos_stalkbuttons.html"&gt;demonstrates multiple parallaxed elements per page&lt;/a&gt;&lt;br /&gt;&lt;a href="http://webdev.stephband.info/parallax_demos_stalkremote.html"&gt;shows parallax by 'remote control'&lt;/a&gt;&lt;br /&gt;&lt;a href="http://webdev.stephband.info/parallax_demos_type.html"&gt;shows how content inside layers can be linked to&lt;/a&gt;&lt;br /&gt;&lt;a href="http://webdev.stephband.info/parallax_demos_target.html"&gt;demonstrates window resizing&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;more tutorials click &lt;a href="http://webdev.stephband.info/parallax.html"&gt;here&lt;/a&gt;&lt;br /&gt;or download click &lt;a href="http://webdev.stephband.info/js/jquery.jparallax.js"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4261674352424229410-232090244082693836?l=js-script.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://js-script.blogspot.com/feeds/232090244082693836/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://js-script.blogspot.com/2010/01/jparallax-by-stephband.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4261674352424229410/posts/default/232090244082693836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4261674352424229410/posts/default/232090244082693836'/><link rel='alternate' type='text/html' href='http://js-script.blogspot.com/2010/01/jparallax-by-stephband.html' title='jParallax by stephband'/><author><name>js script</name><uri>http://www.blogger.com/profile/14822984061422817341</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_KD7nAngcRRw/S1xnra5B2FI/AAAAAAAAAAs/AU4HGwSjpUM/s72-c/diagram_parallax.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4261674352424229410.post-8555023636457980417</id><published>2010-01-24T07:14:00.001-08:00</published><updated>2010-01-24T07:26:11.664-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><title type='text'>Resizable WYMEditor with jQuery UI Resizable</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_KD7nAngcRRw/S1xmgZ1VQWI/AAAAAAAAAAk/AjLQv4Dkq54/s1600-h/wym.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 211px;" src="http://1.bp.blogspot.com/_KD7nAngcRRw/S1xmgZ1VQWI/AAAAAAAAAAk/AjLQv4Dkq54/s320/wym.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5430327957578400098" /&gt;&lt;/a&gt;&lt;br /&gt;I took &lt;a href="http://www.pyjax.net/blog/1/2008/04/13/resizable-plugin-wymeditor/"&gt;pyjax's WYMEditor resizable plugin&lt;/a&gt; and turned it into something that works for me using jQuery UI 1.6.&lt;br /&gt;&lt;br /&gt;To use this, include jQuery, jQuery UI core and resizable, WYMEditor, then this. In that order.&lt;br /&gt;&lt;br /&gt;JavaScript:&lt;br /&gt;&lt;br /&gt;   1.&lt;br /&gt;      WYMeditor.editor.prototype.resizable = function(options) {&lt;br /&gt;   2.&lt;br /&gt;          var wym = this;&lt;br /&gt;   3.&lt;br /&gt;          // Define some default options&lt;br /&gt;   4.&lt;br /&gt;          var default_options = {&lt;br /&gt;   5.&lt;br /&gt;                  start: function(e, ui) {&lt;br /&gt;   6.&lt;br /&gt;                      jQuery(wym._box).data("wym_height",&lt;br /&gt;   7.&lt;br /&gt;                          jQuery(wym._box).find("iframe").height()&lt;br /&gt;   8.&lt;br /&gt;                      );&lt;br /&gt;   9.&lt;br /&gt;                  },&lt;br /&gt;  10.&lt;br /&gt;                  stop: function(e, ui) {&lt;br /&gt;  11.&lt;br /&gt;                      jQuery(wym._box).data("wym_height",&lt;br /&gt;  12.&lt;br /&gt;                          jQuery(wym._box).find("iframe").height()&lt;br /&gt;  13.&lt;br /&gt;                      );&lt;br /&gt;  14.&lt;br /&gt;                  },&lt;br /&gt;  15.&lt;br /&gt;                  // resize is called by the jQuery resizable plugin whenever the&lt;br /&gt;  16.&lt;br /&gt;                  // client area was resized.&lt;br /&gt;  17.&lt;br /&gt;                  resize: function(e, ui) {&lt;br /&gt;  18.&lt;br /&gt;                      var diff = ui.size.height - ui.originalSize.height;&lt;br /&gt;  19.&lt;br /&gt;                      jQuery(wym._box).find("iframe").height(jQuery(wym._box).data("wym_height") + diff);&lt;br /&gt;  20.&lt;br /&gt;                      // If the plugin has horizontal resizing disabled we need to&lt;br /&gt;  21.&lt;br /&gt;                      // adjust the "width" attribute of the area css, because the&lt;br /&gt;  22.&lt;br /&gt;                      // resizing will set a fixed width (which breaks liquid layout&lt;br /&gt;  23.&lt;br /&gt;                      // of the wymeditor area).&lt;br /&gt;  24.&lt;br /&gt;                      if( !ui.options.handles['w'] &amp;&amp; !ui.options.handles['e'] ) {&lt;br /&gt;  25.&lt;br /&gt;                          ui.size.width = "inherit";&lt;br /&gt;  26.&lt;br /&gt;                      }&lt;br /&gt;  27.&lt;br /&gt;                  },&lt;br /&gt;  28.&lt;br /&gt;                  handles: "s,e,se",&lt;br /&gt;  29.&lt;br /&gt;                  minHeight: 250,&lt;br /&gt;  30.&lt;br /&gt;                  maxHeight: 600&lt;br /&gt;  31.&lt;br /&gt;              };&lt;br /&gt;  32.&lt;br /&gt;       &lt;br /&gt;  33.&lt;br /&gt;          // Merge given options with default options. Given options override&lt;br /&gt;  34.&lt;br /&gt;          // default ones.&lt;br /&gt;  35.&lt;br /&gt;          var final_options = jQuery.extend(default_options, options);&lt;br /&gt;  36.&lt;br /&gt;       &lt;br /&gt;  37.&lt;br /&gt;          jQuery(wym._box).resizable(final_options);&lt;br /&gt;  38.&lt;br /&gt;       &lt;br /&gt;  39.&lt;br /&gt;      };&lt;br /&gt;&lt;br /&gt;From this point, you can use a resizable WYMEditor by adding this to your postInit setting when you create a WYMEditor on the page.&lt;br /&gt;&lt;br /&gt;JavaScript:&lt;br /&gt;&lt;br /&gt;   1.&lt;br /&gt;      wymeditor({postInit: function(wym) {&lt;br /&gt;   2.&lt;br /&gt;              wym.hovertools(); // other plugins&amp;hellip;&lt;br /&gt;   3.&lt;br /&gt;              wym.resizable({handles: &amp;ldquo;s,e&amp;rdquo;,&lt;br /&gt;   4.&lt;br /&gt;              maxHeight: 600});&lt;br /&gt;   5.&lt;br /&gt;          }&lt;br /&gt;   6.&lt;br /&gt;      })&lt;br /&gt;&lt;br /&gt;view the &lt;a href="http://marcgrabanski.com/webroot/resources/wymeditor-resizable"&gt;demo&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4261674352424229410-8555023636457980417?l=js-script.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://js-script.blogspot.com/feeds/8555023636457980417/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://js-script.blogspot.com/2010/01/resizable-wymeditor-with-jquery-ui.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4261674352424229410/posts/default/8555023636457980417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4261674352424229410/posts/default/8555023636457980417'/><link rel='alternate' type='text/html' href='http://js-script.blogspot.com/2010/01/resizable-wymeditor-with-jquery-ui.html' title='Resizable WYMEditor with jQuery UI Resizable'/><author><name>js script</name><uri>http://www.blogger.com/profile/14822984061422817341</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_KD7nAngcRRw/S1xmgZ1VQWI/AAAAAAAAAAk/AjLQv4Dkq54/s72-c/wym.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4261674352424229410.post-3338495229087505959</id><published>2010-01-24T06:38:00.000-08:00</published><updated>2010-01-24T06:53:07.159-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='article'/><title type='text'>Biggest AJAX problem</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_KD7nAngcRRw/S1xew0jXEuI/AAAAAAAAAAc/DooQdIaPW5s/s1600-h/ajax_big_header.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 166px;" src="http://1.bp.blogspot.com/_KD7nAngcRRw/S1xew0jXEuI/AAAAAAAAAAc/DooQdIaPW5s/s320/ajax_big_header.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5430319443535663842" /&gt;&lt;/a&gt;&lt;br /&gt;Or, how I found myself in front of a 700 MB memory footprint Firefox.&lt;br /&gt;&lt;br /&gt;AJAX is becoming the new "de facto" standard in the web application industry. Every where you look on the web there are changes and on almost all sites to approach the AJAX world. Gmail and Yahoo Mail are some of the biggest web applications implementing AJAX and the results on both are amazing.&lt;br /&gt;&lt;br /&gt;Browser world&lt;br /&gt;&lt;br /&gt;If you ask a JavaScript developer about what is the biggest problem of JavaScript programming it will probably tell you it's browsers' incompatibilities. This is a very big issue and as long as the major players will not come to an understanding (and unfortunately they won't) and provide a common ground it will remain a big issue.&lt;br /&gt;&lt;br /&gt;I will not mention here other problems from the CSS world for example.&lt;br /&gt;&lt;br /&gt;Fortunately along with AJAX came a lot of frameworks and libraries that address this problem and hide the ugly details from the programmer.&lt;br /&gt;&lt;br /&gt;The PROBLEM&lt;br /&gt;&lt;br /&gt;In my opinion there is a worse problem then hacking your way around bugs and differences. That problem is represented by memory leaks.&lt;br /&gt;&lt;br /&gt;JavaScript VM comes with a garbage collector and aside from some edge cases you might encounter, it does a pretty good job. Once you close a page a lot of work is done behind the scene to clear unreferenced objects. A lean, mean cleaning machine.&lt;br /&gt;&lt;br /&gt;Well... AJAX can mess this up. The page is not closed any more.&lt;br /&gt;&lt;br /&gt;The problem is not AJAX in itself as a programming paradigm but in what it can do for the application. With AJAX you can retrieve data from the server without closing the page and rebuilding it. And that data is placed inside the same page and manipulated by JavaScript programs. New DOM objects are created over and over, new JavaScript objects are created based on those data, new events are attached to all this objects. Few programmers destroy those object and unattache the events.&lt;br /&gt;&lt;br /&gt;AJAX is still young and most of the people that have done some AJAX implementation for their site are just pulling some HTML parts from the server and using innerHTML to replace the content of a div element. No harm done. As the applications are becoming more and more complex the use case changes. XML or JSON is pulled from the server and DOM objects are created based on them. It is very easy to forget something.&lt;br /&gt;&lt;br /&gt;Unfortunately most JavaScript programmers are sloppy. They were taught to be that way by the old browsing habits. There was no need to clean after you. When the page needed some more information, it was regenerated on the server and rendered again by the browser. A clean sheet to work on. Everything that was persistent were the cookies on the browser.&lt;br /&gt;&lt;br /&gt;Taking care of your things in JavaScript is harder than you think. Very good programmers missed this. I was using an AJAX application from a well known company (not here to throw the stone) and after heavy usage for about two days without closing my browserFeature Articles, it reached the respected 700 MB footprint in my laptop's memory.articlesfactory&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4261674352424229410-3338495229087505959?l=js-script.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://js-script.blogspot.com/feeds/3338495229087505959/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://js-script.blogspot.com/2010/01/biggest-ajax-problem.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4261674352424229410/posts/default/3338495229087505959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4261674352424229410/posts/default/3338495229087505959'/><link rel='alternate' type='text/html' href='http://js-script.blogspot.com/2010/01/biggest-ajax-problem.html' title='Biggest AJAX problem'/><author><name>js script</name><uri>http://www.blogger.com/profile/14822984061422817341</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_KD7nAngcRRw/S1xew0jXEuI/AAAAAAAAAAc/DooQdIaPW5s/s72-c/ajax_big_header.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4261674352424229410.post-1895715436423664608</id><published>2010-01-24T06:31:00.000-08:00</published><updated>2010-01-24T06:51:57.528-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><title type='text'>Validating Form Input in JavaScript</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_KD7nAngcRRw/S1xecYiG4pI/AAAAAAAAAAU/cq-jS4Y6V9Y/s1600-h/javascriptformvalidator_20080624105502.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 268px; height: 300px;" src="http://2.bp.blogspot.com/_KD7nAngcRRw/S1xecYiG4pI/AAAAAAAAAAU/cq-jS4Y6V9Y/s320/javascriptformvalidator_20080624105502.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5430319092416832146" /&gt;&lt;/a&gt;&lt;br /&gt;This time we'll make a form that collects information about the&lt;br /&gt;visitor at your site. You must have filled-in copious&lt;br /&gt;registration forms or survey forms where you had to enter your&lt;br /&gt;name, your email, your address, etc. Sometimes users,&lt;br /&gt;intentionally or unintentionally, enter wrong information that&lt;br /&gt;can either spoil your database scheme or give you lots of useless&lt;br /&gt;data and hence, waste your precious server space.&lt;br /&gt;&lt;br /&gt;To avoid such problems, as much as it can be managed, we&lt;br /&gt;programmatically try to make sure, that data is entered in an&lt;br /&gt;orderly fashion, and no unusable fields are entered. Checking&lt;br /&gt;individual fields of the form does this.&lt;br /&gt;&lt;br /&gt;We'll see a form here with three fields: Name, Phone and Email.&lt;br /&gt;In this form, no field should be left blank, there should be no&lt;br /&gt;numbers in the Name field [1,2,3,4,.], and in the Email field, no&lt;br /&gt;email should be without the "@" sign. We can carry out more&lt;br /&gt;complex validations, but at the moment, these three should&lt;br /&gt;suffice.&lt;br /&gt;&lt;br /&gt;/// Remove the extra dots while testing. They have been just&lt;br /&gt;inserted so that some email programs don't freak out at the&lt;br /&gt;presence of a JavaScript in the email.&lt;br /&gt;&lt;bloquote&gt;&lt;br /&gt;&lt;..script language="JavaScript1.2"&gt;&lt;br /&gt;function CheckName(HoldName)&lt;br /&gt;{&lt;br /&gt;NoNumThere='true';&lt;br /&gt;for(i=0; i&lt;br /&gt;{&lt;br /&gt;for(j=0; j&lt;10; j++)&lt;br /&gt;{&lt;br /&gt;if(HoldName.charAt(i)==j.toString())&lt;br /&gt;{&lt;br /&gt;NoNumThere='false';&lt;br /&gt;break;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;if(NoNumThere=='false')&lt;br /&gt;{&lt;br /&gt;break;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;return NoNumThere;&lt;br /&gt;}&lt;br /&gt;function CheckMail(HoldMail)&lt;br /&gt;{&lt;br /&gt;IsValid='true';&lt;br /&gt;if(HoldMail.indexOf("@")&lt;=0)&lt;br /&gt;{&lt;br /&gt;IsValid='false';&lt;br /&gt;}&lt;br /&gt;return IsValid;&lt;br /&gt;}&lt;br /&gt;function checkfields()&lt;br /&gt;{&lt;br /&gt;var AllFilled='true';&lt;br /&gt;for(i=0; i&lt;3; i++)&lt;br /&gt;{&lt;br /&gt;if(visitor.elements[i].value.length==0)&lt;br /&gt;{&lt;br /&gt;alert("The field [" + visitor.elements[i].name + "] can not be&lt;br /&gt;left blank.");&lt;br /&gt;AllFilled='false';&lt;br /&gt;visitor.elements[i].focus;&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;if(AllFilled=='true')&lt;br /&gt;{&lt;br /&gt;var NameValid=true;&lt;br /&gt;var EmailValid=true;&lt;br /&gt;NameValid=CheckName(visitor.vname.value);&lt;br /&gt;EmailValid=CheckMail(visitor.vemail.value);&lt;br /&gt;if(NameValid=='false')&lt;br /&gt;{&lt;br /&gt;alert("Sorry, your name can not contain numbers.");&lt;br /&gt;visitor.vname.focus;&lt;br /&gt;}&lt;br /&gt;if(EmailValid=='false')&lt;br /&gt;{&lt;br /&gt;alert("Sorry, this does not seem like a valid email&lt;br /&gt;address.");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;if(NameValid=='true' &amp;amp; EmailValid=='true')&lt;br /&gt;{&lt;br /&gt;alert("RIGHTO!!!");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/bloquote&gt;&lt;br /&gt;&lt;br /&gt;Copy and paste the code as it is, and save the entire content as&lt;br /&gt;a new HTML page. Then load it on to your browser. Unless you see&lt;br /&gt;the result, it'll be difficult to follow the script if you do not&lt;br /&gt;have prior programming background. The first condition is, none&lt;br /&gt;of the fields can be submitted blank. Click on the submit button&lt;br /&gt;without entering anything and observe the reaction.&lt;br /&gt;&lt;br /&gt;Here, we are making ample use of the recently learnt for(){.}&lt;br /&gt;loop. Then we have used function too, to carry out certain&lt;br /&gt;validations. Our main function, checkfields(), is associated with&lt;br /&gt;the OnClick attribute of the "Submit" button, that is, when you&lt;br /&gt;click on the "Submit" button, this function gets triggered.&lt;br /&gt;&lt;br /&gt;Some new terms in today's script are: true, false, charAt(),&lt;br /&gt;toString(), break, indexOf(), string.length, and&lt;br /&gt;orm.elements[ ].&lt;br /&gt;&lt;br /&gt;A quick explanation to make things easier:&lt;br /&gt;&lt;br /&gt;If at 10:30 pm, I say, "It is night", then&lt;br /&gt;&lt;br /&gt;var fact='true'&lt;br /&gt;&lt;br /&gt;and if I say at 10:30 pm that "It's afternoon", then&lt;br /&gt;&lt;br /&gt;var fact='false'&lt;br /&gt;&lt;br /&gt;Which explains the use of true and false, which are also called&lt;br /&gt;Boolean operators, which means, a Boolean variable can either be&lt;br /&gt;true or false, but NEVER both.&lt;br /&gt;&lt;br /&gt;Until we learn about arrays, every character in a string has an&lt;br /&gt;index position. For instance, if we have&lt;br /&gt;&lt;br /&gt;var city="Delhi"&lt;br /&gt;&lt;br /&gt;then city.charAt(0)="D", city.charAt(1)="e",&lt;br /&gt;city.charAt(2)="l"...city.charAt(4)="i".&lt;br /&gt;&lt;br /&gt;toString(), converts another data type to a string data-type. For&lt;br /&gt;example,&lt;br /&gt;&lt;br /&gt;var num1=31&lt;br /&gt;var num2=21&lt;br /&gt;var char1=num1.toString()&lt;br /&gt;var char2=num2.toString()&lt;br /&gt;&lt;br /&gt;So,&lt;br /&gt;&lt;br /&gt;num1+num2=52&lt;br /&gt;and&lt;br /&gt;char1+char2=3221&lt;br /&gt;&lt;br /&gt;In the second case, instead of being added, the variables are&lt;br /&gt;being concatenated, which indicates that they are strings, not&lt;br /&gt;numbers. We'll see its application later.&lt;br /&gt;&lt;br /&gt;break, true to its name, breaks something. In this case, it&lt;br /&gt;breaks the loop in which it occurs, and takes the execution of&lt;br /&gt;the program to the line immediately after the loop, without&lt;br /&gt;meeting the condition required to complete the loop.&lt;br /&gt;&lt;br /&gt;indexOf() tells us about the position of a particular character&lt;br /&gt;in a string. Look its use in the following code:&lt;br /&gt;&lt;br /&gt;var city="Delhi"&lt;br /&gt;&lt;br /&gt;Referring to this code, city.indexOf("e") should give us a value&lt;br /&gt;1 and city.indexOf("h") should give us a value 3.&lt;br /&gt;city.indexOf("z") should give us a value less than zero,&lt;br /&gt;indicating that it does not belong to the given string.&lt;br /&gt;&lt;br /&gt;String.length gives us the length of the string, for instance, if&lt;br /&gt;city="Delhi", then city.length would give us 5.&lt;br /&gt;&lt;br /&gt;Again, elements[ ] is an array, and we haven't dealt with them&lt;br /&gt;yet, so we leave the rest of the explanation to the next section. &lt;a href="http://www.articlesfactory.com/"&gt;article&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4261674352424229410-1895715436423664608?l=js-script.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://js-script.blogspot.com/feeds/1895715436423664608/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://js-script.blogspot.com/2010/01/validating-form-input-in-javascript.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4261674352424229410/posts/default/1895715436423664608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4261674352424229410/posts/default/1895715436423664608'/><link rel='alternate' type='text/html' href='http://js-script.blogspot.com/2010/01/validating-form-input-in-javascript.html' title='Validating Form Input in JavaScript'/><author><name>js script</name><uri>http://www.blogger.com/profile/14822984061422817341</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_KD7nAngcRRw/S1xecYiG4pI/AAAAAAAAAAU/cq-jS4Y6V9Y/s72-c/javascriptformvalidator_20080624105502.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4261674352424229410.post-2081657187449069385</id><published>2010-01-22T06:36:00.000-08:00</published><updated>2010-01-22T06:40:11.199-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jquery menu'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><title type='text'>Jquery Lavalamp</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_KD7nAngcRRw/S1m4QZ-D8_I/AAAAAAAAAAM/p9hZAZu3_a0/s1600-h/lavalamp.PNG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 47px;" src="http://4.bp.blogspot.com/_KD7nAngcRRw/S1m4QZ-D8_I/AAAAAAAAAAM/p9hZAZu3_a0/s320/lavalamp.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5429573417760453618" /&gt;&lt;/a&gt;&lt;br /&gt;This is the easy part. Most of the javascript work is taken care by the Lava Lamp plugin itself. As a developer, you just have to include the mandatory and/or optional javascript files and fire a call to initialize the menu.&lt;br /&gt;&lt;br /&gt;nclude a reference to the jQuery library and the LavaLamp plugin. Optionally, include the easing plugin as well. It has many cool effects, that are not contained in the core. For instance, the “backout” effect used in this demo is part of the easing plugin.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gmarwaha.com/jquery/lavalamp/zip/lavalamp-0.2.0.zip"&gt;download&lt;/a&gt;|&lt;a href="http://www.gmarwaha.com/blog/2007/08/23/lavalamp-for-jquery-lovers/"&gt;homepage and demo&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4261674352424229410-2081657187449069385?l=js-script.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://js-script.blogspot.com/feeds/2081657187449069385/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://js-script.blogspot.com/2010/01/jquery-lavalamp.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4261674352424229410/posts/default/2081657187449069385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4261674352424229410/posts/default/2081657187449069385'/><link rel='alternate' type='text/html' href='http://js-script.blogspot.com/2010/01/jquery-lavalamp.html' title='Jquery Lavalamp'/><author><name>js script</name><uri>http://www.blogger.com/profile/14822984061422817341</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_KD7nAngcRRw/S1m4QZ-D8_I/AAAAAAAAAAM/p9hZAZu3_a0/s72-c/lavalamp.PNG' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
