•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 370,612 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,058 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 JSP advertiser: Lunarpages JSP Web Hosting
Views: 12994 | Replies: 1
![]() |
How can we pass the variable value from javascript to jsp page at runtime? I am getting this problem when i want to display the second drop down box according to the selected item in the first drop down.
For ex: Lets consider we have a drop down field named Gender(Male,Female).
If we select Male then the next Drop Down has to be shown as (Kumar, Mr,...)
For ex: Lets consider we have a drop down field named Gender(Male,Female).
If we select Male then the next Drop Down has to be shown as (Kumar, Mr,...)
You can't. JSP runs on the server, Javascript (which is NOT Java) runs on the client. You might want to look into something like AJAX which will allow your javascript to make a complete connection to the server, receive data, and then update your page, which will make it look like you are doing what you are asking, but it takes longer than a true programmatic connection.
P.S. Don't come back and ask for more info concerning AJAX. That is another thing does not belong on this forum.
P.S. Don't come back and ask for more info concerning AJAX. That is another thing does not belong on this forum.
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
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
- Very Very Urgent...Need Code for Calculating Execution Time For Jsp Page (JSP)
- How to run iReport jrxml from a jsp page (JSP)
- Generating clientside javascript (ASP)
- I want to run my jsp page online on internet (Java)
- how to call javabean from jsp page upon onChange event (JSP)
- Passing paramter from javascript to jsp (JavaScript / DHTML / AJAX)
- install and run tomcat3 and implement a simple jsp page (JSP)
Other Threads in the JSP Forum
- Previous Thread: Hi
- Next Thread: Please help(Problem in insertion data to database)



Linear Mode