473,385 Members | 1,753 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,385 software developers and data experts.

how to load list from database,in drop-drag box

Hi!

I have one page to add infornation to database.
In that page their are some drop-drag boxes,in which i want ,it must show list after loading from database.........like
name is one drop-drag box when i clik to select,it should show names from database.
Is their any way to do this?
Jul 24 '07 #1
8 2620
r035198x
13,262 8TB
Hi!

I have one page to add infornation to database.
In that page their are some drop-drag boxes,in which i want ,it must show list after loading from database.........like
name is one drop-drag box when i clik to select,it should show names from database.
Is their any way to do this?
This sounds like a Javascript/Ajax problem.
So I'll move it over there.
Jul 24 '07 #2
might be......ok.......
Jul 24 '07 #3
r035198x
13,262 8TB
might be......ok.......
You're connecting to the database right. So which server side language are you using?
Jul 24 '07 #4
jsp
installed tomcat+mysql+jdbc.
Jul 24 '07 #5
r035198x
13,262 8TB
jsp
installed tomcat+mysql+jdbc.
You should have mentioned that in your first post.
Do you know how to connect to a database using JDBC then? Because that's all you need to do and then you can use a while loop to populate the drop down box.

Edit: This may end up going back to the Java forum
Jul 24 '07 #6
oh sorrry,
i know how to access database.i could able to fire queries through page also.
i am not getting how to use that while loop?
Jul 24 '07 #7
r035198x
13,262 8TB
oh sorrry,
i know how to access database.i could able to fire queries through page also.
i am not getting how to use that while loop?
You don't need to fire queries when the drop down is clicked. You simply need to create the options of the drop down using the values from the database.

Expand|Select|Wrap|Line Numbers
  1.   while(rs.next()) {
  2. %> 
  3.        <option value="<%=rs.getString(1)%>"><%=rs.getString(1)%> </option>
  4. <%
  5.       }
  6. %>
Jul 24 '07 #8
Thanks sir
Now its working.
Jul 24 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: C White | last post by:
I've got another drop list problem I am using the following code where users select a name, but it should pass a name and email into the table <select name="user"> <option value="<%...
9
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
4
by: Chris | last post by:
Hi, I am wondering where in my ASP.NET application to load a dropdown list box that basically only changes once a year. I load a drop down list box with about 40 locations. If it never...
2
by: Ren | last post by:
Hi all, I am a bit new to PHP and SQL so this may seem like a dumb question. I have already created a drop down list as part of a form which is automatically populated with values taken from a...
4
by: CPD | last post by:
From PHP, doing a DROP TABLE and a CREATE TABLE is successful, but doing a LOAD FILE keeps failing, with the error "Access denied for user 'db_user'@'localhost' (using password: YES)". The...
5
by: ashok893 | last post by:
I'm using two drop down list ina form. I have generated the first drop down list from MySQL database. When i select an option from first drop down list, i have to generate second drop down list...
1
by: inbamca | last post by:
Hi, Functionality is like when pressing 'CTRL+click' on drop down list in the main jsp page, a popup window appears with a list box contains all the values of the drop down clicked on the main page....
2
by: comerica1 | last post by:
I have the basic structure as follows: 2 drop downs A & B. A is populated using (datasource methods - from database). B is poulated using A's selected value as input and retrieve the list...
1
by: dmj07 | last post by:
Hi all, I was wondering of an easy way to set the selected value of a drop down list by using a value retrieved from the database. Here is my code: SqlCommand cmdUser = new...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.