• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Good uses of Ajax

 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of the things that Ajax is good for is to do things that can improve the user experience. One project I had was a survey. It had 20 questions, 10 were multiple choice. The head hanchos wanted it to be all on one page. Ends up people were loosing their data since their session would expire. Hence I came up with a solution with a pop up window to stop this. Problem was that pop up windows get blocked by pop up blockers installed. I changed it to iframes, but you would run into problems if the session expired.

So I came up with a Ajax solution. This is the newest version of the script:
http://radio.javaranch.com/pascarello/2005/10/25/1130246930301.html

Now this is a good use of the technology. If anyone else has good uses for Ajax please share them.

Eric
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:
If anyone else has good uses for Ajax please share them.
Eric


Thanks for the update Eric.

One use i found using Ajax is
1. I have a case were user request for a new "3 char code" for a given business entity. BEFORE we used to submit that code request to the server-side, check against database(54,000rows) and respond by saying "available or not" on a new screen. NOW we say "available or not" by simply calling the Ajax script on OnChange event of the input field. The same screen will show whether the code is available or not with innerHTML option. This saves both server and user time, most of all its looks elegant. :-)
Regds
Balaji
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Balaji Loganathan:

Thanks for the update Eric.

One use i found using Ajax is
1. I have a case were user request for a new "3 char code" for a given business entity. BEFORE we used to submit that code request to the server-side, check against database(54,000rows) and respond by saying "available or not" on a new screen. NOW we say "available or not" by simply calling the Ajax script on OnChange event of the input field. The same screen will show whether the code is available or not with innerHTML option. This saves both server and user time, most of all its looks elegant. :-)
Regds
Balaji



I have done the same thing for a registration page where I send back the username to the server. I changed the field's border to green if it is good and red if it was taken. I rally like using Ajax for this type of validation that could not be done with the traditional postback.

Eric
 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One more very good use will be that web application will eventually evolve to become like a simple client application like VB etc., where in, once the user enters data in any text boxes, the corresponding validation for each entry can be done.

Also depending upon input in one field other fields can be populated as well. This will be of good use as far as a big input form is concerned.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic