• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Calling a JSP page

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We want to save data into a database.
I know First case is correct.But not sure about second case.
First Case
<form method="post" action="abc.jsp">
then
<input type="submit">

Second Case
<form method="post">
then
<input type="Button" on Click="location.href='abc.jsp'">

Basically I am using onChange java script function in a form for drop down menu.
When I use first case,when onChange function is called,then it goes towards
abc.jsp page.
But when I use the second case,then only null goes to the database.
Can any one help me in this situation.What way can I use to overcome my problem.
I want to open the same form when onChange function is called and when click on button then abc.jsp should be called.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Tahir.

Well in this case you canuse the onclick event of the button to call the JSP
page (abc.jsp)
i.e it would be something like

<input type=submit onclick()=window.location='abc.jsp'

And regards to the database are you setting session or are you returing a resultset. That portion is not very clear. But for the button try this.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic