I have a hyperlink submit button inside one of my forms. This button is for a simple message system. <a href="#" onclick='document.getElementById("mailboxaction").value="read";document.forms["checkboxes"].submit();'>Read</a> PHP: This piece of code works perfectly in Internet Explorer but it won't even post the form in Firefox. I have tried setting the last piece of code that submits the form to "this.form.submit();" but neither work in Firefox. If anyone wants to try this on your own system then you can use the form below; <form action='' method='POST' name='checkboxes' id='checkboxes'> <input type='hidden' name='test_field' value='test field' /> <input type='hidden' name='mailboxaction' value='' /> </form> PHP: and stick this var_dump($_POST); PHP: at the top of the page to see the result of the post. If anyone has any ideas or solutions as to why this doesn't work in Firefox I would be forever grateful. So the full page of code should look something like; var_dump($_POST); <form action='' method='POST' name='checkboxes' id='checkboxes'> <a href="#" onclick='document.getElementById("mailboxaction").value="read";document.forms["checkboxes"].submit();'>Read</a> <input type='hidden' name='test_field' value='test field' /> <input type='hidden' name='mailboxaction' value='' /> </form> Code (markup): Thanks for taking a look!
Hi Weirfire, it's because IE is full of bugs. It should not work on IE either. Firefox is more accurate, so it doesn't let you call getElementById('mailboxaction') on hidden form field, that doesn't have any id="mailboxaction", only name... Or you can use document.forms["checkboxes"].mailboxaction.value="read" - that works on name Have a nice day in Ireland