News

Log In Sponsors
Partner Sites





Submitting a form using a rollover



I have my rollovers working but I cannot find out how to submit an option that a user has selected. head JS function:[code:2siyxhyg]function doSubmit(){ document.OptSelVal.UpOption.value.submit();[/code:2siyxhyg] body:[code:2siyxhyg] <table border="0" cellspacing="0" cellpadding="0"> <tr> <td> <form action="<?php echo $SCRIPT_NAME; ?>" method="post" enctype="application/x-www-form-urlencoded" name="OptSelVal" id="formA"> Date Article<br /> 10-13-07 Article 1<br /> 09-14-07 Article 2<br /> <select name = "UpOption" size="5" class="mine"> <?php $query = "select * from articles;"; $result=mysql_query($query); ?> <?php while($articlerow=mysql_fetch_assoc($result)) { echo " <option value='". $articlerow['primindex'] . "'>". $articlerow['Title'] ."</</option>"; } ?> </select> </td> </tr> <tr> <td><a href="javascript:doSubmit()" onMouseUp="switchImage('Retrieve',0)" onmouseout = "switchImage('Retrieve',0)" onmouseover = "switchImage('Retrieve',1)" onmousedown = "switchImage('Retrieve',2)"><img name="Retrieve" src="images/editBtn_up.jpg" border="0"/></a> </form> </tr> </table>[/code:2siyxhyg] If I use a regular input button everything works fine. But when i try a rollover button using the JS function above nothing seems to happen when submitted.

Click here to read the whole forum topic






cron