• Post Reply Bookmark Topic Watch Topic
  • New Topic

use jsp in javascript

 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

In the jsp page I want to fetch records from database on change event of select and display in another select options.

How I can do it? Can I use javaScript and jsp?

I tried


but it is not working

Can anyone suggest me?

Thanks

Vaishali
 
Swastik Dey
Rancher
Posts: 1686
7
Android Eclipse IDE Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AJAX might be suitable for your requirement.
 
Dieter Quickfend
Bartender
Posts: 543
4
Java Netbeans IDE Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot use JSP in a javascript function - it is compiled into html on the server,
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have a fundamental misunderstanding of what JSP is, and how it works. Please read this article.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!