xyn Posted November 29, 2007 Share Posted November 29, 2007 hey. My form is as follows: <form name="viewPm" method="POST" action="{home}messenger/action.php"> and my javascript is: <select name="pmaction" class="pmdropm" onChange="document.viewPm.submit()"> <option value="0">Select an action</option> <option value="1">Reply</option> <option value="2">Delete</option> <option value="3">Move</option> <option value="4">Flag unseen</option> <option value="5">Flag seen</option> </select> <input id="go" type="submit" name="submit" value="Go" class="buttonsm" onMouseOver="javascript:buttonCh(1,'go');" onMouseOut="javascript:buttonCh(2,'go');"> Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 29, 2007 Share Posted November 29, 2007 are you wanting your select menu to submit your form when it is changed - that looks like what your trying to do - if so; try this: <script language="javascript"> function actiontime() { document.getElementById('go').click(); } </script> <form name="viewPm" method="POST" action="{home}messenger/action.php"> <select name="pmaction" class="pmdropm" onchange="actiontime()"> <option value="0">Select an action</option> <option value="1">Reply</option> <option value="2">Delete</option> <option value="3">Move</option> <option value="4">Flag unseen</option> <option value="5">Flag seen</option> </select> <input id="go" type="submit" name="submit" value="Go" class="buttonsm" onMouseOver="javascript:buttonCh(1,'go');" onMouseOut="javascript:buttonCh(2,'go');"> </form> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.