I have an HTML dropdown list which i'm populating from a database. My question is how can i retrieve the value of a selected item from this dropdown list using AJAX? Thanks in advance.
dhani09
3
Newbie Poster
Recommended Answers
Jump to PostOk so, one way is to execute a function when the "onchange" event triggers. In this function, you send a request to your ASP, ASP.NET, PHP, etc.. page with the selection and the page will return the results back. then simply display the results or do whatever calculation with the …
Jump to PostHave you verified your PHP page is working? You can check the page by accessing the page directly using the web browser connecting to the page on the web server. Also, the path to the filename doesnt appear correct to me. If this file is on the root of the …
Jump to PostDo you have this site online to take a look with debugging tools?
Jump to PostOk so it looks like the demo code that I provide you is correct. I created a demo online for you to look at. There are two files. Default.php and display-product.php. Here is the code:
default.php<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <script> function getData(str){ …
Jump to Postdhani09 are you open to using jQuery?
All 25 Replies
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
dhani09
3
Newbie Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
dhani09
3
Newbie Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
dhani09
3
Newbie Poster
dhani09
3
Newbie Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
dhani09
3
Newbie Poster
paulkd
59
Newbie Poster
dhani09
3
Newbie Poster
paulkd
59
Newbie Poster
dhani09
3
Newbie Poster
paulkd
59
Newbie Poster
dhani09
3
Newbie Poster
paulkd
59
Newbie Poster
dhani09
3
Newbie Poster
paulkd
59
Newbie Poster
dhani09
3
Newbie Poster
paulkd
59
Newbie Poster
paulkd
59
Newbie Poster
dhani09
3
Newbie Poster
paulkd
59
Newbie Poster
anandhan001
0
Newbie Poster
dnyaneshk2
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.