my dog learned polymorphism*
The moose likes Servlets and the fly likes multisubmit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "multisubmit" Watch "multisubmit" New topic
Author

multisubmit

qingwu wang
Ranch Hand

Joined: Feb 19, 2003
Posts: 147
Hello everyone,
If I have more than one submit buttions,and every submit will transact different content.I want to run it on the pocket pc platform,if I abandon javascript,Can I get it?
[ June 16, 2003: Message edited by: qingwu wang ]

Thanks...qingwu<br />When I open my eyes,I see your pretty face.
puma Linus
Greenhorn

Joined: Jun 11, 2003
Posts: 3
Hello
For each submit button can call different function and in those functions u can call the respective content.Its quite easy .
But i didn't got that "pocket pc platform" what it exactly means? :confused
srinivas madugula
Greenhorn

Joined: Apr 12, 2003
Posts: 6
handling every thing on the serverside. just use a single form and submit the entire data. take the required data elements in the servlet based on submit button and redirect to final page on server.(this is ineffecient). but no other possibility.
------------------------------
<form ... action="redirect.class">
<input type=submit name="a">
<input type=submit name="b">
every submit button has a name. use it in servlet to find which submit is called.
do the job of javascript in redirect servlet. and redirect to the required servlet or jsp.
qingwu wang
Ranch Hand

Joined: Feb 19, 2003
Posts: 147
Thanks your reply.
They should be different page(jsp||servlet)that I make mention of different contents,then one form should own multi-action events in order to go.
Philip Shanks
Ranch Hand

Joined: Oct 15, 2002
Posts: 189
qingwu,
Are you talking about multiple forms, each with its own submit, or multiple submits within a single form?
In the latter, you will require some sort of client side logic to get different behavior out of the various submit buttons. If you don't use javascript, I'm not sure what options remain.
If you have multiple forms in the same page, I believe only the inputs of one form are sent to the server. Even if the form parameters have the same names and values, each form can have a different action, thus different behavior on the server side.


Philip Shanks, SCJP - Castro Valley, CA
My boss never outsources or has lay-offs, and He's always hiring. I work for Jesus! Prepare your resume!
qingwu wang
Ranch Hand

Joined: Feb 19, 2003
Posts: 147
Hello Philip,I think my question is relations of the latter,but I think I have find a way to deal with it by using image which look like buttons.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: multisubmit