• 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:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

deleteing rows and storing row(text box) values in javascript

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am deleteing rows using java script in frontend and each row contains a text box and check box.If the check box is checked I am deleting thos rows.But I want to collect the all the values of the text boxes in those deleted rows and finally i want to send to the back end on submiting the form.

Can any body help me on this.




Thanks
[ June 20, 2005: Message edited by: Eric Pascarello ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to Javaranch,

A few tips to help you out here.

1.) You'll need to change your display name to a real (looking anyway) first and last name.

2.) If you're going to post more than a line or two of code, wrap it a set of UBB Code tags (there is a button on the edit screen to create them for you).
This preserves your indenting and makes your code easier for others to read -- which in turn makes it more likely that someone will help you.

3.) We have an HTML Javascript forum on this site. Those guys will probably be able to help you better than we could when it comes to client side coding.


Re, you question. One solution that comes to mind is to have a select box in a hidden div, somewhere within your form. Each time you delete a row, add it's value to the select box. Name it "deleted_rows" or something like that.

When you retrieve the values from your form on the server, use getParameterValues("deleted_rows") to get an array of all the values that were removed from your HTML table.
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"java explore",

There aren't may rules that have been put into place here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to HTML/Javascript.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would not delete the rows, I would just hide them (display="none") if you need to submit back their data to the server. Add a hidden element in one of the rows and set its value to 1 for visible and 0 for hidden. You would be able to determine what the status of the row is when you post back the form.

My 2 cents..

Eric
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic