www.webdeveloper.com
Results 1 to 2 of 2

Thread: HTML form: Add parameters to action value

  1. #1
    Join Date
    Oct 2006
    Posts
    59

    HTML form: Add parameters to action value

    Hello,
    In a Struts2 form I have something like this:
    Code:
    <s:form action="myForm_view" name="MyForm" >
     <s:textfield name="searchPhrase"/>
     .....
    </s:form>
    When something is entered in textfield and you hit enter key, the form submits to myForm_view.action. How do I add a parameter to the action in this case? I need something like myForm_view.action?arg=1.

    Please help. Thanks in advance.

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    <input type="hidden" name="arg" value="1">
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles