• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Catch the javascript button pressed event

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Jeff Dube
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 25653
183
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic