• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

dynamic forms: delete an input box

 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have a number of input boxes on a form but want to post only those values that meet certain criteria. Is there a way to delete these before posting to a servlet?
Thanks in advance
Frank
[ July 25, 2002: Message edited by: Frank Daly ]
 
Sheriff
Posts: 67746
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
Not sure exactly what you are after here, but you can certainly use an onsubmit handler to blank out values that don't meet your criteria. That would result in empty values to your request parameters for those fields.
If you want to eliminate the request parameters completely (rather than submitting them with empty values), you can, if you are dealing with modern browsers only (i.e. not Netscape 4.x), use DOM manipulation to remove the offending INPUT elements from the form before submitting.
Is that any help?
bear
[ July 25, 2002: Message edited by: Bear Bibeault ]
 
Frank Daly
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bear
I now plan to store the names and values of the text elements, that I want to send, in an array. I then will redraw the form with only these elements. There is a useful website covering dynamic forms at http://javascript.about.com/library/scripts/bldynoforms.htm
Frank
 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic