• 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

Javascript to Submit the Value of a Text Field

 
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting into deep trouble.

My link is defined inside a form. Everything is tested without problem except that the link does not pick up the value of a text field that is also defined inside the form. Although the link does pick up fixed values and they are submitted.

Therefore, I have to use Javascript to submit the value of a textfield when the link is clicked.

Moreover to my problem. I have several text fields in the form. A client may or may not enter a value in any one of those text fields. But, all the entered values must be submitted when the link is clicked.
Please help me.


[ July 19, 2006: Message edited by: Natalie Kopple ]

[ July 19, 2006: Message edited by: Natalie Kopple ]

[ July 19, 2006: Message edited by: Bear Bibeault ]
[ July 20, 2006: Message edited by: Natalie Kopple ]
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check whether the value is assigned to text field properly.

You mean to say that text field value is not being sent to server on form submit ?
 
Natalie Kopple
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I mean that the value of the text field is not sent by clicking on the "link". The "link" invokes an action.

Both the text field and the link are inside a pair of "form" tag.

Please, I need a Javascript.
 
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
Please post the HTML of the form, field and link in question.

Note: post the rendered HTML, not the JSP source full of struts tags.

You're probably not forming the URL correctly to pass the value.
 
Yeah, but is it art? What do you think tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic