Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Parameter not passed  RSS feed

 
Sajee Joseph
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I have an odd problem in my JSP.
My jsp has a few form elements & button.
On Click on each button i call a javascript which does the validations & submits the form.

The code in the javascript is something like this..
form1.action = "Myservlet?ActionType=Save";
form1.submit();
On clicking of the Button the Servlet is being invoked. But surprisingly the Parameter ActionType is not passed. All the form elements are being passed. What could be the problem. I expected the Parameter
Pls help.

Regards,
Saj
[ December 30, 2004: Message edited by: Bear Bibeault ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set the ActionType as a hidden field in the form, don't try to pass it via the form action itself.
 
Sajee Joseph
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello David,

Yup i know that using a Hidden Field i can overcome the problem.
What i want to know if whats wrong with the previous approach? Why didnt that work??
 
Sajee Joseph
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello David,

What i would like to know is Y doent the earlier approcah work??
Whats wrong with it?
Do i always use Hidden fields as run in such cases??
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sajee,

It should work.
Can you post your servlet code?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!