aspose file tools*
The moose likes Servlets and the fly likes Catch  the javascript button pressed event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Catch  the javascript button pressed event" Watch "Catch  the javascript button pressed event" New topic
Author

Catch the javascript button pressed event

Jeff Dube
Ranch Hand

Joined: Jun 14, 2001
Posts: 44
Hi all,
How can i call the "<%@ include file="Response.jsp" %>" when my javascript button is pressed?
(This button have to call a page that insert new html code under the old one.)
Thanks
Jeff
Arsin Delve
Greenhorn

Joined: Jul 08, 2001
Posts: 29
I think I can help you (I'm pretty good with Javascript) but I don't understand the question very well. Can you elaborate, and then I will try to be of some assistance?
Arsin Delve.
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Jeff:
You cannot call the "<%@ include file="Response.jsp" %>" by pressing any button.
This is a JSP directive that allows files to be included in a JSP before the page is translated into a servlet.
That was a really weird question, BTW... I suggest you take some time to study the problem domain that Java Servlets and JSPs address.
My US $200.00


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Jeff Dube
Ranch Hand

Joined: Jun 14, 2001
Posts: 44
Ok, thank you,
Here is my problem.
I do have a form (inside a table) that allow a user to enter some informations. After the information is enter, the user have two choices
1) Press the button to add a new row (under the previous row), this row contains 3 text area (<tr><td>..<form>..</td></tr> )
2) submitt the form.
Why do i need to add a new row? --> because the user may need 1 or multiple row to enter 1 or more value.
Briefly, the thing i need to do is insert a new row inside my table when the user click the button "insert a new row". I thought that making a jsp file with the <tr><td><form>...</td></tr> tags could be a good idea but it seems like.... it's not. Can anybody give me a tip or any other solutions???
Thank you
Jeff
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16303
    
  21

You have basically 2 choices.
1. Capture the current form data and resend the page with a larger input area. Yuck.
2. Replace the HTML form with a Java Applet that has "grow" logic in it.
Your problem basically is due to the fact that HTML isn't designed to support partial updating of a page. About the closest you could get would be to play strange and unportable games with frames or hidden areas.
The applet's about the cleanest solution, except of course that you'll probably have to convince the user to download and install a 5+ MB plug-in. Even had Microsoft not X'ed out Java, the JVMs "supported" by IE and Netscape don't have Swing in them.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Catch the javascript button pressed event