473,327 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Dynamic TextField Drop Down Pre-fill

Hello,

I was wondering if the following scenario can be done using plain
Javascript or AJAX. We have an input text box within a form. As soon
as the user starts typing in character into that text box possible
options dynamically appear below that text box so that the user can
simply select an option rather than typing the rest of the data. For
example, in gmail as soon as you start typing in characters into the
To: field (or CC: field or BCC: field) email addresses that start with
the user typed characters dynamically appear. Then the user can
simply select the best match rather than typing in the entire email
address.

I know that this can be done using AJAX and some fancy CSS, but I was
wondering if this can be done without AJAX, i.e. with just plain
Javascript and CSS? If this can only be done with AJAX, what would it
take to throw up AJAX on Tomcat/iPlanet web servers?

Thanks,
--Willard
Feb 21 '08 #1
2 2915
On Feb 21, 5:00 pm, Chuck wrote:
I was wondering if the following scenario can be done using
plain Javascript or AJAX. We have an input text box within
a form. As soon as the user starts typing in character into
that text box possible options dynamically appear below that
text box so that the user can simply select an option rather
than typing the rest of the data.
Remember to think about what happens when/if the user starts deleting
characters.
I know that this can be done using AJAX and some fancy CSS,
The CSS is largely irrelevant, as it only influences how the end
result looks.
but I was wondering if this can be done without AJAX, i.e.
with just plain Javascript and CSS?
If you mean client-side javascript then the problem is the data from
which the choices are offered. For client-side javascript to present
the suggestions it would need to have access to the data and so the
data would have to be transmitted to the client in full. For any
worthwhile system that would be an insane practice.
If this can only be done with AJAX, what would it take to
throw up AJAX on Tomcat/iPlanet web servers?
Remember that AJAX (as it is usually thought of) is just a means of
making HTTP request from client-side javascript (and receiving/working
with the responses). The server is doing nothing more than a server
would usually do; receiving HTTP requests and sending responses. There
would have to be code on the server (servlets/JSPs or the like) to
receive the requests, work out what to suggest (from the database, or
somewhere), and send the lists of suggestions back to the client-side
code for presentation.
Feb 21 '08 #2
Chuck <wi*************@gmail.comwrites:
I know that this can be done using AJAX and some fancy CSS, but I was
wondering if this can be done without AJAX, i.e. with just plain
Javascript and CSS?
Yes it can. But the reason you mainly see this as an Ajax solution is
that it's only really useful if the list of possible options is too long
to realistically send to the browser and navigate using standard form
elements.

If your option list isn't that long, you generally don't even need
javascript: a simple <selectbox would work too - and most browsers
already provide simple keyboard navigation on that.
If this can only be done with AJAX, what would it
take to throw up AJAX on Tomcat/iPlanet web servers?
Nothing special. You just need an url that can be queried and will
return the options in a useful format. Any dynamic web server platform
should already have everything you need.

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
Feb 21 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jonny Tango | last post by:
Hello everyone. Q. How do I create a dynamically-generated drop-down list for use in an array. I'm using PHP with a MySQL database (through phpMyAdmin) My database table is called...
7
by: Jack | last post by:
Hi, I am trying to test a sql statement in Access which gives me the error as stated in the heading. The sql statement is built as a part of asp login verification, where the userid and password...
1
by: t.kiesche | last post by:
Hello I want to make a textfield (INPUT type=text) or something that looklike this, to drop down a list with word. Just like: A user writes the letter 'a' and in the dropdown list come a...
15
by: firstcustomer | last post by:
Further to my earlier post, I've found something that does partly what I'm doing, but there are two issues: 1) There is an error in the script. Being a Javascript newbie, I've no idea what the...
8
by: Cylix | last post by:
Any way to define the length of a textfield? I have just set all the field with a width so that they look like clear and easy to read, However, When I see the page of mac os, They are totally...
6
by: mcgrew.michael | last post by:
I hope this is the right group. I am very new to ASP so this is probably a stupid question. I have some vbscript that query's AD and populates a recordset. I know the recorset contains the...
3
by: amcoldspy | last post by:
Hi, am trying to create dynamic drop down boxes.. there are 3 drop down boxes. The second drop down box elements are to be update based on the selection made in the first drop down box...
10
by: Luxury17 | last post by:
I know this has been posted and asked about many times, but I still cannot seem to find an answer that fits my situation. I am pretty new with javascripting, and have been teaching myself as the...
2
by: Hugh | last post by:
The PyGUI website specified this place as the place for general discussion about it, so here goes.... First off - thanks for something that is so straightforward to get running on OSX... I've...
1
by: Sundhas | last post by:
Hey! I am working on jrxml to create dynamic re0ports. I have parameterized the columns i.e. the jrxml for that report can be used to generate other reports as well. However, i have not managed...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.