Results 1 to 3 of 3

Thread: submitting forms from links

  1. #1

    Thread Starter
    Addicted Member HairyDave's Avatar
    Join Date
    Aug 2002
    Location
    Er...I can't remember.
    Posts
    196

    submitting forms from links

    I have an HTML page that contains a number of checkboxes. When the user selects a box on the page it becomes checked - simple.

    The page contains links that make the page redisplay itself in some other format. However, by clicking the link, those checkboxes that were checked become unchecked.

    Question is, how can I simulate a submit from the links on the page so that when a link is selected, the values from the checkboxes are submitted and accessible from the next page?

    Thanks in advance

    HD

  2. #2
    Addicted Member
    Join Date
    Jul 2002
    Location
    Brussels, Belgium
    Posts
    139
    I don't know how to do this in an html page, but when you use an asp page, you can retrieve the values in a page by using the Request.Form() method. You need to put the checkboxes in a form and sumbit the form.

  3. #3
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    Code:
    <body>
      <script language="JavaScript">
        function submitMyForm() {
          document.myForm.submit();
        }
      </script>
    
      <form id="myForm">
         <!-- all your control etc etc here -->
      </form>
    
      <a href="www.someotherplace.com" onClick="submitMyForm()">Text Here</a>
    </body>

Posting Permissions

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



Click Here to Expand Forum to Full Width