•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 375,231 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,202 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 617 | Replies: 5
![]() |
•
•
Join Date: Oct 2006
Posts: 128
Reputation:
Rep Power: 2
Solved Threads: 1
Hey everyone,
I'm working on some javascript code. What i have now is a list box that contains certain elements and another list box, blank at the moment, next to it. I want, when someone clicks an element within the first list box, that in the background, a MySQL statement is run that will select everything pertaining to the selection. Like "SELECT * from TABLE_NAME WHERE coulumn = SELECTED ELEMENT". I was hoping someone could point me in the right direction as to how to perform this. Thanks!
-barefoot
I'm working on some javascript code. What i have now is a list box that contains certain elements and another list box, blank at the moment, next to it. I want, when someone clicks an element within the first list box, that in the background, a MySQL statement is run that will select everything pertaining to the selection. Like "SELECT * from TABLE_NAME WHERE coulumn = SELECTED ELEMENT". I was hoping someone could point me in the right direction as to how to perform this. Thanks!
-barefoot
•
•
Join Date: May 2006
Location: ★★ijug.net★★
Posts: 817
Reputation:
Rep Power: 4
Solved Threads: 61
May not be possible, use server side script like php
★★ Homework Help ★★ Freelance Programmer ★★ Freelance Jobs ★★
★★ Build A Website ★★ Interview Question And Answer ★★ Tax Filing ★★
★★ Build A Website ★★ Interview Question And Answer ★★ Tax Filing ★★
AJAX maybe, to connect to a Servlet (or some other serverside program) that returns the results.
But, in any case, this is a JSP/Java forum, not JavaScript, please post this type of question in a JavaScript forum, next time. I have already asked the admins to move this one.
But, in any case, this is a JSP/Java forum, not JavaScript, please post this type of question in a JavaScript forum, next time. I have already asked the admins to move this one.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
"I don't accept change. I don't deserve to live."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
•
•
Join Date: Aug 2007
Posts: 74
Reputation:
Rep Power: 1
Solved Threads: 8
Well you require a combination of JSP and JavaScript. I don't have the code right now but will work on it and provide it to you. The logic is:
1) Retrieve a java.util.List of Objects from database in a user session.
2)Iterate over the java.util.List and populate the objects in HTML list.
3)Use Java Script and use onClick/onChange method of list to call another Servlet/JSP.
4) Use <jsp:include> to embed the second JSP with an html list in the first JSP.
5) Write the logic for populating the html list in the second JSP with the elements of the first one
1) Retrieve a java.util.List of Objects from database in a user session.
2)Iterate over the java.util.List and populate the objects in HTML list.
3)Use Java Script and use onClick/onChange method of list to call another Servlet/JSP.
4) Use <jsp:include> to embed the second JSP with an html list in the first JSP.
5) Write the logic for populating the html list in the second JSP with the elements of the first one
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- Javascript links not working (Web Browsers)
- JavaScript's window.opener (JavaScript / DHTML / AJAX)
- recommendations for JavaScript learning resources? (JavaScript / DHTML / AJAX)
- Javascript/HTML problem!!! (JavaScript / DHTML / AJAX)
- Javascript Useful? (IT Careers and Business)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Enter key does not work in window.showModalDialog
- Next Thread: Images, thumbnails, and iFrames



Linear Mode