Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

JSP and forms/HTML question

Thread view: 
honmancheung@gmail.com - 26 Jun 2006 21:43 GMT
I have a lot of forms on a page and each form with a action button that
will send the information to the servlets. And after I click the action
button, I can only get those information within the form. Is there
anyway I can get parameters outside that form at the same time?

Thank you all in advance,
Chris Smith - 26 Jun 2006 21:47 GMT
> I have a lot of forms on a page and each form with a action button that
> will send the information to the servlets. And after I click the action
> button, I can only get those information within the form. Is there
> anyway I can get parameters outside that form at the same time?

You'll have to put everything in one form.  You can tell which button is
pressed by giving all your buttons different names containing some
unique identifier.

Signature

Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation

hoho123 - 26 Jun 2006 21:54 GMT
Is there anyway I can go around it? like using JavaScript or anything?
Let me explain a little bit more. I have a text field that is necessary
for all the forms, but it is located on the top of all forms. Because
we don't want that text field show up on everywhere.

I appreciate your help

> > I have a lot of forms on a page and each form with a action button that
> > will send the information to the servlets. And after I click the action
[quoted text clipped - 8 lines]
> Chris Smith - Lead Software Developer / Technical Trainer
> MindIQ Corporation
Chris Smith - 26 Jun 2006 22:25 GMT
> Is there anyway I can go around it? like using JavaScript or anything?
> Let me explain a little bit more. I have a text field that is necessary
> for all the forms, but it is located on the top of all forms. Because
> we don't want that text field show up on everywhere.

If you can count on the user having JavaScrip enabled, then you can put
a hidden field into each form, and copy the value from the visible text
field into that hidden field in an onsubmit handler.  The problem with
this is that it doesn't gracefully fall back to a working application if
your user has disabled JavaScript.

Signature

Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.