Category Archives: Applicaton Review

How to avoid bots from filling up Online forms using Spry?

I’m sure every one some day or other were annoyed while filling out the painful CAPTCHA image in the form field. I have hated it all the time and its a pain for the users to read through the image and retype it again. Here is a simple solution that I found out while working @ESRI . I’m not sure who developed this solution but it has avoided a lot of bots from filling up online forms.

The solution is to load the form when the user clicks an buttons/link basically any event that an real human can do it. The form could be

  • loaded using an AJAX call. Using ur own favorite Javascript library.
  • Just hide the form and then show when the user clicks on the link.

After putting up the Yahoo online status image on my web site I have been getting a lot of spam IMs to my ID and to prevent this from happening I decided to implement this method. Since I’m a big time fan of Spry I did it using that and here is how I did it.

<script src=”/spry/SpryHTMLPanel.js” type=”text/javascript”></script>

<div id=”YahooStatus”>
<a onclick=”hpanel.loadContent(‘/forms/dsp_Yahoo_status.html’,{async : true}); return false;” href=”javascriot:void();”>

<h2>Get my Yahoo online status</h2>

</a>
</div>

<div id=”rpanel”></div>

<script type=”text/javascript”><!–

var hpanel = new Spry.Widget.HTMLPanel(“rpanel”,{evalScripts : true});

// –></script>

  1. Initially I load up the Spryhtmlpanel.js final.

    <script src=”/spry/SpryHTMLPanel.js” type=”text/javascript”></script>

  2. Then set up an anchor region with onclick event that pulls the page called dsp_yahoo_status.html from forms directory in to the rpanel div region.

    <div id=”YahooStatus”>
    <a onclick=”hpanel.loadContent(‘/forms/dsp_Yahoo_status.html’,{async : true}); return false;” href=”javascriot:void();”>

    <h2>Get my Yahoo online status</h2>

    </a>
    </div>

  3. The rpanel div region is the region that gets loaded with the Yahoo status.

    <div id=”rpanel”></div><

  4. Then initialize the spry html panel widget. The evalscripts tells spry to execute any javascript inside the loaded page. This feature would help us to run validation scripts when an form is loaded instead of a normal text.

    <script type=”text/javascript”><!–

    var hpanel = new Spry.Widget.HTMLPanel(“rpanel”,{evalScripts : true});

    // –></script>

This way only an human would be able to view my Yahoo status. The same concept can be used for loading up forms as well and all this in just 10 line of codes.

To find more info on how to use Spry HTML panel check out this page which has better examples.

I Vote for Spry 1.6

Well Spry is the new JavaScript library from Adobe. I always had trouble working with AJAX and with Spry its so much easier to implement AJX calls and effects.

There are JavaScript library like jquery,moo tools etc that does the same job. The one huge difference between them and Spry is they all are object oriented design and Spry is tag based programming. Since I’m a Coldfusion programmer its easier for me to adapt to tag based then remembering all the methods.

Some features that I like about Spry:

  • Paging
  • Form validations.
  • Supports HTML data sets as well. Makes it easier for me format the data in a table rather than XML and can be loaded along with the page. Spry makes any data region within the same page as invisible. Moreover this way we don’t have to make a AJAX call since the data is already available in the page. This method is useful  for country,state list or any static drop list box that gets info from a DB.

Its still in beta and it has already bet my expectation hope they will come up with more goodies and make my life easier.

AL

Firefox 2.0 Plugins I like..

Lots of Firefox plugins out there but here r 2 plugins that O like very much.I would like everybody to give it a shot especially if ur a web developer.

Google Browser Sync:

Its a bookmark manager for firefox from Google which syncs info between PC’s.It basically stores these information in google server and authentication is through gmail login,password and a unique pin number pair.

  • Bookmarks
  • Cookies
  • History
  • Saved passwords
  • Tabs and windows opened.

Some might be worried abt privacy issues but u can choose what to store and they have an encrypt option;Not sure how good it is.Atleast we could use it to store the bookmarks and access it everywhere there is net.

Web Developer Extension:

Its a handy plugin which basically shows almost every info about a web page.I Find it very helpful

  • To delete cookies for each individual pages.
  • To view form fields information without opening the selection source.
  • And it has a inbuild WYSIWUG html editor inbuild.
  • And it has got lots of more functions that prevents me from viewing the Source and searching through them.

Regards
AL

Microsoft Private Folders Failure to launch…

Microsoft Private Folder is an add on application for Genuine Win XP users,which was released on Jul 10,2006 which stores private files in a folder in users desktop protected by password.But after an outcry from system admins and parents has made Microsoft to pull the strings off and disable Private folder.

It was a gr8 application but i don’t understand Y people raised so many doubts abt the applications use,there are a lot of other freeware application that does much better job like Winzip,Winrar with password protection is as good as Private folder.Most of the corporate provide winzip as part of the system and why not Private Folder..

May be Bcz its from Microsoft..these people are selfish..

To Microsoft developers of Private folder..when u can password protect a folder in desktop why not provide password protection to all folders..atleast to windows folders..so that people don’t corrupt the OS….

On the Whole microsoft provides software for everything thats non-essential to end user..

Switch to our mobile site