Post Form Information Without Clicking Submit??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Milkstr
    New Member
    • Sep 2006
    • 49

    Post Form Information Without Clicking Submit??

    I have a page with a form, a couple of hidden fields and a submit button, the information in the hidden fields i want to submit automatically without clicking the submit button, is there a way of simulating the button been clicked???

    Its becuse i dont want the user to alter any thing on the page but it to be submitted automatically

    <input type="submit" name="Submit" value="Submit" />

    this is the submit button, is there an extra command that can be added to it or just a way of simulating it???
  • pavancognizant
    New Member
    • May 2007
    • 7

    #2
    you can simulate submit button by using document.forms[0].submit() in your javascript function....

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      The javascript solution is the only way. There is no way to do it with html.

      Comment

      Working...