I want to simply submit a value via POST (not GET) by clicking a button in a form. At the moment I type in a value of either 0 or 1 into a text box and then click submit. I'd rather this was achieved in one button click. My code at present looks like this: <form method='post'> <input type='text' name='binset' site='1'> <input type='submit' value='Submit'> </form> Code (markup): How can I submit this with one button click using ONCLICK ? I've already managed to do it using get with single click buttons but get is gonna cause further problems. Maybe I need to post about it on the JavaScript forum. I think I need the onclick to trigger a JavaScript function which sends a post value and also reloads the page. Thanks
something like this? <form method='post' action='script.php' name='linkform'> <input type='hidden' name='binset'> <input type='button' onclick='javascript: document.linkform.binset=2; document.linkform.submit();' value='Submit'> </form> HTML: