File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Wonderful Number in jsp 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 » Engineering » HTML, CSS and JavaScript
Bookmark "Wonderful Number in jsp" Watch "Wonderful Number in jsp" New topic
Author

Wonderful Number in jsp

YuenLian Wu
Ranch Hand

Joined: Nov 16, 2005
Posts: 73
Hi all,

I am having problem using jsp with javascript. Actually I have a text inside the HTML TAG, like <TD height="27">1</TD>, the "1" indicating the sequence number, and I want to pass it to server without using any textfield, combo box, etc. My form is kind of dynamic , which means the next row may be 2, or 4 since user can remove any row dynamicly. How can the server side retrieve this wonderful number ?

Please help

Transistor
Nimchi Yung
Ranch Hand

Joined: Jan 27, 2004
Posts: 71
Before you submit, you could use javascript to build up your contents
in your TD tags and submit it to the server.

--Nimchi
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

Use a hidden input element.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
YuenLian Wu
Ranch Hand

Joined: Nov 16, 2005
Posts: 73
I can't simply use the hidden tag, since the server side won't that value belong to which row in my form. Also, hidden tag can't pass in an array form into server, so that all the rows in my form won't be recognize by the processing mechanism from the server

Transistor
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
hidden tag can't pass in an array form into server...Very good

That is why you need to develop something that takes the array and makes in a format tat can be passed to the server. Bears idea would have a hidden field in each row that you would update with the new position. Or you take the array, make it into a string and put that value in the hidden element.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wonderful Number in jsp