Reading HTML contents from the server

M

milkyway

Hello all,

Is this possible
1. Create a table in HTML
2. Through javascript add and delete items to the table
(have already done this)
3. Hit the save button and pass the contents of the table to the
server.

Are there any examples out there where the table contents are being
passed to the server?

How can one do this? I am basically looking to pass such contents to a
bean (i.e. 1 'get' statement would fetch all of the items in the HTML
table).

Kindest Regards.
 
D

Dag Sunde

milkyway said:
Hello all,

Is this possible
1. Create a table in HTML
2. Through javascript add and delete items to the table
(have already done this)
3. Hit the save button and pass the contents of the table to the
server.

Are there any examples out there where the table contents are being
passed to the server?

How can one do this? I am basically looking to pass such contents to a
bean (i.e. 1 'get' statement would fetch all of the items in the HTML
table).

This is really a JavaScript question...:

Just as you put the values into the table cells with JavaScript,
write a JavaScript function to extract the values from the table
cells and build a (ie. semicolon/Cr separated) string from them.
document.getElementById("cellId_N");

Now put this string into a hidden form-field, and submit the form
.form.doSubmit();
 
M

milkyway

Thank you for responding ;-)

I have created cells with the opposite command in Javascript DOM:

for iteration = 1 to 999
cell.setAttribute('name', 'Cell' + iteration);
end

Now on the server side, I am trying to get the value on the server side
with something like

for i = 1 to 999
value = getvalue of ('cell' + i); <-------
end


The arrow is what I need now. How to get avalue like this out on the
server side.

Any ideas?

Kindest Regards.
 
H

Hal Rosser

milkyway said:
Thank you for responding ;-)

I have created cells with the opposite command in Javascript DOM:

for iteration = 1 to 999
cell.setAttribute('name', 'Cell' + iteration);
end

Now on the server side, I am trying to get the value on the server side
with something like

for i = 1 to 999
value = getvalue of ('cell' + i); <-------
end


The arrow is what I need now. How to get avalue like this out on the
server side.
Dag gave you the answer.
you can put the data in a form by using hidden form fields
then submit the form
- BTW - JavaScript is not Java
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top