• Post Reply Bookmark Topic Watch Topic
  • New Topic

call servlet from javascript

 
Nguyen Phuoc
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone .Help me
I cannot call servlet from javascript function in search.jsp
-- index.html contain 2 frame (Frame 1 , Frame 2)
Frame 1 include search.jsp
Frame 2 include blank
when run index.html included search.jsp
Click Search button ==> function javascript ==> set target to Frame 2 of index.html and call servlet SearchProduct ==>servlet SearchProduct redirect to result.jsp
Here my code
index.html
<html>

search.jsp

servlet SearchProduct
 
sudipto shekhar
Ranch Hand
Posts: 826
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Calling a Servlet from a javascript:

What i did for myself is :

document.PDForm.action="../ProcessDefinitionOut?newsdlc="+idea;
document.PDForm.method="POST";
document.PDForm.submit();

This worked for me

What is the following page that you see after you execute the java script?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!