473,322 Members | 1,911 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,322 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 1621
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

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...
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...
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
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...
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: 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...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.