Ajax Talk - Asynchronous javascript and xml discussion board
 FAQ   Search    Usergroups      Register   Profile   Check your messages   Log in 
Signup now to enjoy a range of free membership advantages !!
Ajax Talk - Moderators Wanted
Ajax code help - java environment

 
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Help
View previous topic :: View next topic  
Author Message
fun9
New one
New one


Joined: 17 Oct 2007
Posts: 2

PostPosted: Wed Oct 17, 2007 2:14 am    Post subject: Ajax code help - java environment Reply with quote

I have input field where user can type airport code. When user enter airport code in this field it will make Ajax call to backend and it will return exact match which should be populated when user leave this input field.

Second if user enter location name in this same filed it will make Ajax call to backend and it will return few airport locations as a result. Since this time itís not an exact match and it returns few airports based on location name, I want div tag to appear at the bottom of this input field so that use can select appropriate location.

Third if user enter garbage text in input filed it will make Ajax call to backend and it will return no result and I want do display an error massage on page.

I need code to accomplish this in IE and FF.

I donít know Ajax. But I do know JavaScript and JSP. Help!!!!
Back to top
View user's profile Send private message
Jesdisciple
Frequent Poster
Frequent Poster


Joined: 20 Oct 2007
Posts: 36
Location: Tejas

PostPosted: Sun Oct 21, 2007 5:50 am    Post subject: Reply with quote

First off, you'll need the user to indicate what's being entered (airport code or location), i.e., by clicking one of two radio buttons.

Your first case is easy enough, because only one result will match (we assume).

Your second case is harder, and its difficulty increases when you want the suggestions to be more (artificially) intelligent. They range from as simple as Google Suggest to as impressive as MapQuest (although MapQuest doesn't use AJAX). In case you're alright with the first, W3Schools has a primitive implementation in their AJAX tutorial.

In both cases, a null result means the user has entered garbage, and something like "No Result Found" should be displayed on the page.

The actual implementation must wait for tomorrow.
_________________
In ALL things, strive for ><>,
Chris
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Jesdisciple
Frequent Poster
Frequent Poster


Joined: 20 Oct 2007
Posts: 36
Location: Tejas

PostPosted: Sun Oct 21, 2007 7:28 pm    Post subject: Reply with quote

Fun, as I realized just a bit ago, you're not asking for coding help, but for original code. (Yeah, I'm kinda dense, sometimes.) Unless I'm drastically mistaken, the idea of this kind of forum is for you to build some code and, when you get stuck doing so, ask for help. So, until you start implementing this idea yourself (or at least get a specific question, not a product order), I think I'll sit on the sidelines, because I'm not so idle that I'm ready to work for free. What I've posted above should be enough to get you started, once you understand AJAX. To understand AJAX, try http://www.w3schools.com/ajax/default.asp.
_________________
In ALL things, strive for ><>,
Chris
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 Advertisements
 XML & Copyright Notice 
    


Powered by phpBB © 2001, 2005 phpBB Group

What is according to Wikipedia: Ajax Web2.0 XML E4X


Link to our site:

  


del.icio.us digg spurl wists simpy newsvine blinklist furl blogmarks yahoo! myweb smarking ma.gnolia segnalo reddit fark technorati cosmos


Normal Bookmark


Partner Button Links:
Codecrunch.com: Webmaster Tutorials    One Ajax


Partner Text Links:
quomon | web20log | ajaxmatters | tableless | 456bereastreet | music charts | gift ideas | competitions | free xbox 360 | link trade ?


Credits:
it consultancy & project management lead generation zoekmachine optimalisatie steal these buttons seo expert