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

<channel>
	<title>Phine Solutions &#187; usability design</title>
	<atom:link href="http://www.phinesolutions.com/topics/usability-design/feed" rel="self" type="application/rss+xml" />
	<link>http://www.phinesolutions.com</link>
	<description>A web log for web work</description>
	<lastBuildDate>Sat, 17 Sep 2011 15:49:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>When do we need &#8220;smooth scrolling&#8221;</title>
		<link>http://www.phinesolutions.com/when-do-we-need-smooth-scrolling.html</link>
		<comments>http://www.phinesolutions.com/when-do-we-need-smooth-scrolling.html#comments</comments>
		<pubDate>Mon, 05 Apr 2010 14:58:30 +0000</pubDate>
		<dc:creator>1.618</dc:creator>
				<category><![CDATA[usability design]]></category>

		<guid isPermaLink="false">http://www.phinesolutions.com/?p=389</guid>
		<description><![CDATA[Recently I discovered this little javascript hidden gem: smooth scrolling to an anchor link on the same page. Basically it creates smooth scrolling effect when a user clicks on an anchor tag that points to a different part of a page, mostly likely a very long page. Often times, in this kind of situation, the [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I discovered this little javascript hidden gem: <a href="http://www.kryogenix.org/code/browser/smoothscroll/">smooth scrolling to an anchor link on the same page</a>.</p>
<p>Basically it creates smooth scrolling effect when a user clicks on an anchor tag that points to a different part of a page, mostly likely a very long page. Often times, in this kind of situation, the page jumps so quick that I have to look for the URL in the browser&#8217;s address bar to see if I&#8217;m still on the same page. And for a lot of users, this can be confusing sometimes. This little script, once included in the &#8220;head&#8221; tag, will make this kind of scrolling go slower. Although It&#8217;s still a pretty fast scrolling motion, it slows down enough to make user aware that he is being redirected to a different section on the same page.</p>
<p>Another benefit of the approach is that the scrolling subtly reveals the other part of the page as well, which is a nice way to encourage user to explore other part of the page.</p>
<p>Typically I&#8217;m not a big fan of implementing fancy but less practical effects on a web page using javascripts. They do have a cost to load and for most of the users, visual effects wear out after the initial &#8220;oohs and ahs&#8221;. However, this one is a great implementation to address an issue that is too trivial for browser but valuable for web designers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phinesolutions.com/when-do-we-need-smooth-scrolling.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The new Yahoo home page design</title>
		<link>http://www.phinesolutions.com/new-yahoo-home-page.html</link>
		<comments>http://www.phinesolutions.com/new-yahoo-home-page.html#comments</comments>
		<pubDate>Sat, 29 Aug 2009 03:28:09 +0000</pubDate>
		<dc:creator>1.618</dc:creator>
				<category><![CDATA[usability design]]></category>

		<guid isPermaLink="false">http://www.phinesolutions.com/?p=273</guid>
		<description><![CDATA[So the new Yahoo home page has been rolled out for a few weeks. For the most part, I like the new home page. It provides more information with some seemingly moderate changes. However, there are a couple of design points that I think can be made better. The first is the big flyout from [...]]]></description>
			<content:encoded><![CDATA[<p>So the new Yahoo home page has been rolled out for a few weeks. For the most part, I like the new home page. It provides more information with some seemingly moderate changes. However, there are a couple of design points that I think can be made better.</p>
<p>The first is the big flyout from the &#8220;MY FAVORITES&#8221; menu. Basically when you move your mouse over an item, a flyout will pop out. I know it has its own merit, and the feature gives visitors shortcuts under the main category. But a big flyout box that fills out most part of the web page can be quite annoying, especially sometimes it was triggered by an accidental hover over the links. Any most of time I just want to click on the menu and go to my favorite subject &#8211; with this flyout action, I have to deal with some &#8220;delay&#8221; before getting where I want to go.</p>
<p>My suggestion: make the flyout smaller, simpler and more importantly, to load quicker.</p>
<p>Same place, &#8220;MY FAVORITES&#8221; list can get longer and there is not enough slots to display all of them,  to find the rest of the favorites, I have to click on a little &#8220;&gt;&#8221; button to sort of go to the second page of the favorites.</p>
<p>Why not make this one a flyout then? Definitely the right feature for the right place.</p>
<p><strong>Update:</strong></p>
<p>Looks like Yahoo just updated their page design. Now when you hover over the left menu, a much smaller flyout will show, which you can click on to open the quick view. Much better design than kicking open the annoying page view blocker directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phinesolutions.com/new-yahoo-home-page.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Applet vs. Flash based file uploader</title>
		<link>http://www.phinesolutions.com/java-applet-vs-flash-based-file-uploader.html</link>
		<comments>http://www.phinesolutions.com/java-applet-vs-flash-based-file-uploader.html#comments</comments>
		<pubDate>Tue, 21 Jul 2009 01:13:20 +0000</pubDate>
		<dc:creator>1.618</dc:creator>
				<category><![CDATA[usability design]]></category>

		<guid isPermaLink="false">http://www.phinesolutions.com/?p=252</guid>
		<description><![CDATA[Uploading files through a web page is supported in HTML, but with some serious limitations. Usually we set up a Multi-part html form which has an input field that automatically comes with a &#8220;browse&#8221; button for end users to select a file from local file system to upload, but only one at a time. During [...]]]></description>
			<content:encoded><![CDATA[<p>Uploading files through a web page is supported in HTML, but with some serious limitations. Usually we set up a Multi-part html form which has an input field that automatically comes with a &#8220;browse&#8221; button for end users to select a file from local file system to upload, but only one at a time. During which the page will pretty much hang until the web server complete the uploading process and returns the next page. Certainly you can provide multiple input fields to add a little bit of convenience, but there is really no way to upload multiple files at once using just html, and it is quite a tedious process if there are a lot of photos to upload.</p>
<p>Recently I wanted to make uploading photos easier one my site. I want my user to be able to upload any number of photos all at once, and be able to view the uploading progress as well. Since the basic html does not provide this kind of capability and nor does the client side script like JavaScript, &#8220;plugins&#8221; have to be used. I basically have two options to use: Java Applet or Adobe Flash. Microsoft Silverlight is another tool which can create rich client on the browser, but since it is still a relatively new player in the field I didn&#8217;t put a lot of considerations in it.</p>
<p>Two real life examples are Flickr&#8217;s photo uploading tool and Facebook&#8217;s photo application. Flickr uses Flash and Facebook uses Java Applet respectively. Both of the uploaders are integrated nicely to match the style and flavor of their sites and most importantly are easy to use. In a quick comparison, Flickr&#8217;s uploader is light and straightforward. You can select multiple files and see the actual progress during uploading. But the Facebook counterpart lets you to view your computer&#8217;s file system from the tool so making file selection is easier. Plus it has some simple photo manipulation functionality like rotating the photos in place.</p>
<p><strong>Flickr&#8217;s photo uploader</strong></p>
<p><strong><img class="alignnone size-full wp-image-266" title="flickr_screenshot" src="http://www.phinesolutions.com/wp-content/uploads/flickr_screenshot.png" alt="flickr_screenshot" width="459" height="334" /></strong></p>
<p><strong>Facebook&#8217;s Photo Uploader</strong></p>
<p><strong><img class="alignnone size-full wp-image-267" title="facebook_screenshot" src="http://www.phinesolutions.com/wp-content/uploads/facebook_screenshot.png" alt="facebook_screenshot" width="599" height="365" /></strong></p>
<p>To choose which technology to use we have to look at pros and cons, which probably varies in individual situations. I&#8217;ll try to provide some key areas that I found useful to take into consideration when making the decision. Although I ended up choosing the Applet, the decision was largely based on the fact that I&#8217;m more familiar with Java and there is really no time for me to pick up Flash and go from there. For some, Flash might be a better choice.</p>
<h2><strong>Browser compatibility Plugin technology</strong></h2>
<p>Almost all the modern browsers today support Java and Flash. And there is no need to write different versions of application to deal with the browser issues. However, due to the fact that Java and Flash themselves are constantly being upgraded it is necessary to watch the code and make sure it is supported by different Java or Flash versions out there. I think when Adobe released Flash 10 there was some security implementation that broke a lot of Flash app. Sun has been very good on making the newer version of Java backward compatible. Although the newest Java technology is at version 1.6, it is backward compatible to 1.4 and 1.5, which pretty much covers all Java versions out there on user&#8217;s machines.</p>
<p>Both Java Applet and Flash requires the plugins to be installed so browsers can display them correctly. Sometimes they come with the browser installation by default. I don&#8217;t have any data but it seems both Java plugin and Adobe Flash plugin have good penetration on the popular browsers today (Firefox, IE etc.).</p>
<h2><strong>The slowness when loading Applet, at least the very first time.</strong></h2>
<p>Applet is slow to load because the browser has to start Java JVM first then start the Applet. A user&#8217;s machine may be hung for a few seconds to get over this. So if an applet is a beast and a user has a slow internet connection it won&#8217;t look to well. I would say this was a more serious problem a couple of years ago than now. Sun has been improving the Java browser plugin technology and the loading time has been much better with the modern browsers today. I noticed a significant difference between Firefox 3.5 and IE6 on the same machine, with FF beating IE hands down.</p>
<p>Flash, on the other hand feels much lighter, probably due to the fact that Flash is a smaller tool. But the smaller size also comes with limitations in terms of the application capabilities.</p>
<p>Nonetheless I&#8217;ll give Flash one point here.</p>
<h2><strong>Application capability</strong></h2>
<p>Since Applet is written in Java language it pretty much has everything that Java provides &#8212; minus those restricted by the security constraints of course. The rich GUI interface and user interactions and programming APIs are extensive. So it definitely has more capabilities than Flash can provide. Using the file uploader as an example, with Java I can develop GUI interface that user can only view and select multiple files from harddrive, but also drag and drop files to a certain destination, which is a pretty regular task on a desktop. With the rich image libraries available Applet can also have a lot more &#8220;pre-processing&#8221; power like reducing image size, rotating image to a certain orientation and converting images or adding watermarks, etc. Although it is debatable whether whether we should put this kind of the processing functionality on the client side, because it will most certainly make the client heavy to load and expensive to run, the capability is there. Choosing wisely, they are great additions to your web site.</p>
<p>Since Flash is lacking the capability on interacting with desktop things listed above are impossible to be implemented. So I give Applet a point here.</p>
<h2><strong>Code development and IDE</strong></h2>
<p>Java is a mature programming language and the development support reflects this. Learning the language aside, it is quite easy to set up a development environment and start coding. Flash on the other hand, has a smaller developer base and there is less information on the web that I can use to pick up this tool quickly. I might have a little bias here since I&#8217;m more familiar with Java. Flash to me, is a lot like a designer&#8217;s tools.</p>
<p>So I give my bias point to Java.</p>
<h2><strong>Available products</strong></h2>
<p>There are products already developed in both camps. Some of them are free and some of them require a fee. Nothing can beat free, but you get what you paid for. Especially for web apps, a nice demo is far from production. The paid product usually goes through better testing by the developer than Joe&#8217;s little free app.</p>
<p>I listed the ones that I found with good quality and support tracking record below.</p>
<h4><strong>- Applet</strong></h4>
<p><em>The free <a href="http://jupload.sourceforge.net/index.html">jUploader</a></em></p>
<p style="padding-left: 30px;">The jUploader is developed by William JinHua Kwong and it can be downloaded from SourceForge. It seems to be actively maintained. The jar file for basic version is about 370k in size. I&#8217;m sure it can be reduced with Java bytecode obfuscator and shrinker software.</p>
<p style="padding-left: 30px;">The app itself is quite good and documentation is sufficient. However the GUI interface is not as polished as the next candidate: JumpLoader.</p>
<p><em><a href="http://jumploader.com/index.html">JumpLoader</a> &#8211; can be free, but will cost if you want the source</em></p>
<p style="padding-left: 30px;">JumpLoader is developed by jmaster and it is the best I have seen so far. Depending on your requirement you can have a just simple file uploader or quite sophisticated pre-uploading image processor, you can see the demos <a href="http://jumploader.com/demo.html">here</a>. The app itself it very customizable from the functionality to user interface. But it comes with a price. The &#8220;small&#8221; version is over 500k in size, which is still too large in my opinion.</p>
<h4><strong>- Flash</strong></h4>
<p><a href="http://swfupload.org/">SWFUpload</a></p>
<p>This is the free Flash uploader that I like. And it looks similar to the one in Flickr. If you have the Flash development and don&#8217;t mind putting some work you might want to seriously consider this one.</p>
<p><a href="http://www.element-it.com/DemoMultiPOW.aspx">Element-IT  MultiPowUpload</a></p>
<p>I didn&#8217;t download and try the product out myself. But based on the demo I like the features that MultiPowUpload provides. Notice that with the base code was under 100k in size. With some plugin, the Flash code is still in the 100k to 200k range.</p>
<p>Like I mentioned I generally prefer the paid version unless the software has enough open source developer support.</p>
<p>As web evolves the difference between a browser and a desktop application is less and less noticeable. Hopefully you find this post helpful to make a decision if you are in a similar situation. Also feel free to make a comment if I missed something here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phinesolutions.com/java-applet-vs-flash-based-file-uploader.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A great usability tip from usabilitypost.com</title>
		<link>http://www.phinesolutions.com/a-great-usability-tip-from-usabilitypostcom.html</link>
		<comments>http://www.phinesolutions.com/a-great-usability-tip-from-usabilitypostcom.html#comments</comments>
		<pubDate>Sun, 31 Aug 2008 19:22:14 +0000</pubDate>
		<dc:creator>1.618</dc:creator>
				<category><![CDATA[usability design]]></category>

		<guid isPermaLink="false">http://www.phinesolutions.com/?p=157</guid>
		<description><![CDATA[Dmitry from usabilitypost.com picked up this great usability tip. It compares the labels on buttons in Windows and Mac, and explains why it makes more sense to use the verb on the label in Mac. In Windows dialog approach (Yes, no or cancel) but a user has to read the whole dialog to determine what [...]]]></description>
			<content:encoded><![CDATA[<p>Dmitry from usabilitypost.com picked up this <a href="http://www.usabilitypost.com/post/11-usability-tip-use-verbs-as-labels-on-buttons">great usability tip</a>. It compares the labels on buttons in Windows and Mac, and explains why it makes more sense to use the verb on the label in Mac.</p>
<p>In Windows dialog approach (Yes, no or cancel) but a user has to read the whole dialog to determine what to do next, versus a Mac user can just glance through the button labels and know what to do. The difference is small and subtle, yet it demonstrate in every single little detail, there is always room for better design.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phinesolutions.com/a-great-usability-tip-from-usabilitypostcom.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why I don&#8217;t mixx much, from a purely design point of the view</title>
		<link>http://www.phinesolutions.com/why-i-dont-mixx-much-from-a-purely-design-point-of-the-view.html</link>
		<comments>http://www.phinesolutions.com/why-i-dont-mixx-much-from-a-purely-design-point-of-the-view.html#comments</comments>
		<pubDate>Wed, 20 Aug 2008 15:38:43 +0000</pubDate>
		<dc:creator>1.618</dc:creator>
				<category><![CDATA[usability design]]></category>

		<guid isPermaLink="false">http://www.phinesolutions.com/?p=147</guid>
		<description><![CDATA[I use reddit, digg a lot to get the latest news, watch funny stuff and you know, waste time. Besides those two, Mixx.com is another information aggregation site that I like. It has some really nice features like story tagging, drag and drop page editing and local news setup. However, it is just not one [...]]]></description>
			<content:encoded><![CDATA[<p>I use reddit, digg a lot to get the latest news, watch funny stuff and you know, waste time. Besides those two, Mixx.com is another information aggregation site that I like. It has some really nice features like story tagging, drag and drop page editing and local news setup. However, it is just not one of the site that I don&#8217;t frequently go to even I like it.</p>
<p>I don&#8217;t really know the reason. Maybe reddit and digg has given me more than enough news and stories that I need on a daily basis. But I do think the design of the Mixx.com home page has something to do with my lack of using it and it should be improved.</p>
<p><strong>Not allocating the prominent space to the stories</strong></p>
<p>On Mixx home page, the logo and navigation menu take up most of space. Below it is the popular photos section. Frankly I think these small photos with no description or a headline is a waste of the space. The actual submitted stories are pushed down below in kind of in a &#8220;mix&#8221; which does not draw immediate attention. Reddit and digg, are doing much better on present the popular storied using the good part of the page and big font.</p>
<p><strong>Not emphasize the stories</strong></p>
<p>Social news site is about stories. Digg and Reddit, though have the totally different approch on designing their home page, both show that the stories and contents have the highest priority. Both show a lot of headlines, emphasize the titles (using the noticable font on the page), and made sure visitors can get tight into it from the home page. On the contrary, Mixx shows less and tuck them in below the fold. And the short titles are unattractive, at least to me. This may be related to the Mixx users who actually submit the story, but I think Mixx should encourage the submitters to put more content in the title like a lot of redditors do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phinesolutions.com/why-i-dont-mixx-much-from-a-purely-design-point-of-the-view.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKEditor vs. TinyMCE</title>
		<link>http://www.phinesolutions.com/fckeditor-vs-tinymce.html</link>
		<comments>http://www.phinesolutions.com/fckeditor-vs-tinymce.html#comments</comments>
		<pubDate>Fri, 30 May 2008 02:59:19 +0000</pubDate>
		<dc:creator>1.618</dc:creator>
				<category><![CDATA[usability design]]></category>

		<guid isPermaLink="false">http://www.phinesolutions.com/?p=140</guid>
		<description><![CDATA[I am preparing to add WYSIWYG editor to one of my project and looking for some library code to use. The selections narrowed down to FCKEditor and TinyMCE. Both of them look great and perform nicely in the demo. Now comes to the question which one to pick. This article has a nice comparison between [...]]]></description>
			<content:encoded><![CDATA[<p>I am preparing to add WYSIWYG editor to one of my project and looking for some library code to use. The selections narrowed down to FCKEditor and TinyMCE. Both of them look great and perform nicely in the demo. Now comes to the question which one to pick. This article has a <a href="http://webtecker.com/2008/04/02/fckeditor-vs-tinymce/">nice comparison</a> between the two.</p>
<p>Just found out that default editor in WordPress is also based on TinyMCE, which is quite an endorsement. I particularly like the capability to resize the editor&#8217;s size in TinyMCE.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phinesolutions.com/fckeditor-vs-tinymce.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where to find images for my websites</title>
		<link>http://www.phinesolutions.com/where-to-find-images-for-my-websites.html</link>
		<comments>http://www.phinesolutions.com/where-to-find-images-for-my-websites.html#comments</comments>
		<pubDate>Thu, 27 Dec 2007 21:29:41 +0000</pubDate>
		<dc:creator>1.618</dc:creator>
				<category><![CDATA[usability design]]></category>

		<guid isPermaLink="false">http://www.phinesolutions.com/where-to-find-images-for-my-websites.html</guid>
		<description><![CDATA[Being a website builders, I constantly need the images for my sites. There are several ways that I have used to get the images. Some of them worked out well and some were quite disappointing. Stock image sites &#8211; where you can buy I use a couple of sites to buy images: stockxpert.com and istockphoto.com. [...]]]></description>
			<content:encoded><![CDATA[<p>Being a website builders, I constantly need the images for my sites. There are several ways that I have used to get the images. Some of them worked out well and some were quite disappointing.</p>
<p><strong>Stock image sites &#8211; where you can buy </strong></p>
<p>I use a couple of sites to buy images:  stockxpert.com and istockphoto.com. You can get both jpeg or vector images from these sites. Stockxpert.com offers are a little bit cheaper. In my experience, istockphoto.com&#8217;s images have slightly better quality.</p>
<p>This has been my best method to aquire the vector images for icons and logos. If you know a little bit about Adobe Illustrator, you should be able to get some vectors files and use them in different places with some simple tweaks.</p>
<p><strong>Use a local graphic designer</strong></p>
<p>Originally I was looking to get some local talent to help me out but it never worked out. I once worked with a graphic designer who work on some design projects for fortune 500 companies on a logo design. Her draft work was just some pensil scribbles on a piece of paper and her rate will double as soon as she touches a computer. Plus she tried to get me to sign a contract so any future change has been done by her only. A friend told me the best way to go is to hire someone just out of school but I haven&#8217;t tried that myself.</p>
<p><strong>Use ODesk to hire some designers</strong></p>
<p>ODesk.com is a place to hire the freelancers. You can create your project and get people to bid on it. Since the people for hire are from all over the world often time you can find some talent with very cheap rate.</p>
<p>My ODesk experience was a mixed bag. I worked with someone who had tons of hours (total hiring hours by ODesk) but the work was at most mediocro.  Sometimes it appeared he didn&#8217;t even read my requirements in the email. And he was never shy about asking for good ratings at the end of the project. Once he even IMed me to &#8220;request&#8221; better rating because it affects his ODesk rating history. Mind you I wasn&#8217;t even the one who gave him the one star that he probably deserves. He was FOR SURE blocked from my GTalk.</p>
<p>I also worked with some designers who made great work for one project but came up short on the other.</p>
<p>My advise on hiring on ODesk is to find someone who&#8217;s new or hasn&#8217;t many hours accumulated yet.</p>
<p><strong>Get free images online</strong></p>
<p>Although Google image search can find a lot of images, they are mostly copyrighted and it is illegal to directly use them on your websites. This site: <a href="http://yotophoto.com/">yotophoto.com</a> , can find the free-to-use images for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phinesolutions.com/where-to-find-images-for-my-websites.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>remind users when they leave the page</title>
		<link>http://www.phinesolutions.com/remind-users-when-they-leave-the-page.html</link>
		<comments>http://www.phinesolutions.com/remind-users-when-they-leave-the-page.html#comments</comments>
		<pubDate>Fri, 05 Jan 2007 16:01:23 +0000</pubDate>
		<dc:creator>1.618</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[usability design]]></category>

		<guid isPermaLink="false">http://www.phinesolutions.com/remind-users-when-they-leave-the-page.html</guid>
		<description><![CDATA[When a use visits a web page and enter some information into a form, he may intentionally or unintentionally leave the page without clicking on the submit button. It is a good usability effort to remind the user of the possible changes that have happened. We can use a javascript to implement this. /** checkChange.js [...]]]></description>
			<content:encoded><![CDATA[<p>When a use visits a web page and enter some information into a form, he may intentionally or unintentionally leave the page without clicking on the submit button. It is a good usability effort to remind the user of the possible changes that have happened.</p>
<p>We can use a javascript to implement this.</p>
<blockquote><p>/** checkChange.js **/&nbsp;</p>
<p>var alertLeavingPage = false; /* flag to turn on the alert */<br />var pageInputChanged = false; /* the flag of changes made */</p>
<p>// The onbeforeonload is called before the page is changed. It is not a standard<br />// method. But it is supported by IE and FF.<br />window.onbeforeunload = function(theEvent) {<br />&nbsp;&nbsp; if (pageInputChanged == true &amp;&amp; alertLeavingPage == true) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (typeof theEvent == &#39;undefined&#39;) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; theEvent = window.event;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (theEvent) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; theEvent.returnValue = &quot;You have made some changes on this page, please click OK to discard the changes or Cancel to stay on the page.&quot;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp; } else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br />&nbsp;&nbsp; }<br />}</p>
<p>/*<br />&nbsp;* The method should be called on the page where the change needs to be tracked.<br />&nbsp;* The form ID needs to be provided so the change event can be registered on certain form elements.<br />&nbsp;*/<br />function trackChange(formId) {<br />&nbsp;&nbsp; var formElem = document.getElementById(formId);<br />&nbsp;&nbsp; if (formElem) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (var i=0; i&lt;formElem.elements.length; i++) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var inputElem = formElem.elements[i];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (inputElem.type) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var inputType = inputElem.type.toLowerCase();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (inputType == &#39;text&#39; || inputType == &#39;radio&#39; || <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inputType == &#39;checkbox&#39; || inputType == &#39;select-one&#39; || inputType == &#39;textarea&#39;) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inputElem.onchange = setChangedFlag;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // turn on the alert flag<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alertLeavingPage = true;<br />&nbsp;&nbsp; }<br />}</p>
<p>/*<br />&nbsp;* The method which is tied to a change event.<br />&nbsp;*/<br />function setChangedFlag(evt) {<br />&nbsp;&nbsp; pageInputChanged = true;<br />} </p>
</blockquote>
<p>Of course you will need to include this script to the web page. Besides that, you also need to call the trackChange() method to register the form elements that we want to track. So a form Id needs to be set in order to register. A sample html page look like following:&nbsp;</p>
<blockquote><p>&lt;html&gt;</p>
<p>&lt;form id=&quot;the_form_id&quot; action=&quot;&quot; onsubmit=&quot;alertLeavingPage=false; /* no reminder for submission */&quot;&gt;&nbsp;</p>
<p>&lt;/form&gt;&nbsp;</p>
<p>&lt;script type=&quot;text/javascript&quot;&gt;<br />&lt;!&#8211; //<br />trackChange(&#39;the_form_id&#39;);</p>
<p>// &#8211;&gt;&lt;/script&gt;</p>
<p>&lt;/html&gt;&nbsp;</p>
</blockquote>
<p>Once they are added into the page, the user should see this prompt when they leave the page with un-submitted inputs.&nbsp;</p>
<p>&nbsp;<a href="http://www.phinesolutions.com/remind-users-when-they-leave-the-page.html/leaving-page-promptgif/" title="leaving-page-prompt.gif"><img src="http://www.phinesolutions.com/wp-content/uploads/leaving-page-prompt.gif" border="0" alt="leaving-page-prompt.gif" /></a></p>
<p>The method only detects whether there has been any change activity and it won&#39;t be able to tell whether there is change being made. For example, if someone checks a checkbox and unchecks it the script will think there has been change made. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.phinesolutions.com/remind-users-when-they-leave-the-page.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

