• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript to Submit the Value of a Text Field

 
Natalie Kopple
Ranch Hand
Posts: 325
  • 0
  • Mark post as helpful
  • send pies
  • 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 ]
 
Pavan Keely
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic