*
The moose likes HTML, CSS and JavaScript and the fly likes AJAX or JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "AJAX or JavaScript" Watch "AJAX or JavaScript" New topic
Author

AJAX or JavaScript

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I have a web page. First, I provide two radio buttons; one is "one single location" and the other is "multiple location".

If users select the "one single location", I plan to prompt a tabulation that has the information of that particular location.

If users select the "multiple locations", I am going to prompt a number of tabulations onto the screen.

I appreciate advices in regard to whether I should use AJAX or JavaScript to do the prompting?
[ February 15, 2007: Message edited by: JiaPei Jen ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Um, Ajax is JavaScript

Eric
Jason Moors
Ranch Hand

Joined: Dec 04, 2001
Posts: 188
Hi,

I think it depends on whether you have all the location information when you display the page, is so and there is not a lot of data, I would just use javascript to hide/unhide your table. Which would only involve one request to the server.

Otherwise you could javascript and the XmlHttpRequest (Which I guess is what you mean by AJAX) to retrieve the information when the user selects you radio button, i.e. makes the request to the server retrieve the information. This would obviously increase the traffic as you would make a request each time the user clicked on a radio button.

Hope it helps
Jason
 
Don't get me started about those stupid light bulbs.
 
subject: AJAX or JavaScript
 
Similar Threads
Query regarding timezone
<html:select>box validation
code to retrieve result from databse which are selected in the list box
Multiple File Selector
How to retrieve data from database when ever select in drop down list?