POST method is not working while clicking on the menu option in PHP

Poobiaagics

New Member
I am trying to build a menu for my website. When I click on the menu it is supposed to POST to index.php but nothing is happening. I have checked using console.log, the values assign to data-val in are coming in but the hidden INPUT is not working. Can someone put in the right direction by pointing out the problem. ThanksHere is JQuery\[code\] $(document).ready(function($) { $('ul li a').on('click', function() { $('#shareto').val($(this).data('val')); }); });\[/code\]here is the HTML\[code\] <form name="mainmenu" id="mainmenu" method="post" action="index.php"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="96%" height="50" background="images/headerPanel.jpg" valign="center"> <font face="verdana" size="1" color="white"> <h1 align="center">ABC Company</h1></font> </td> <td width="3%" background="images/headerPanel.jpg" valign="center" align="right"> <input type="submit" name="submit" value="http://stackoverflow.com/questions/15840834/Logout" /> </td> <td width="1%" background="images/headerPanel.jpg" valign="center"></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="2%" bgColor=#C11B17></td> <td width="16%" bgColor=#C11B17> <ul> <li><a href="http://stackoverflow.com/questions/15840834/#">Maintanence</a> <ul> <li><a href="http://stackoverflow.com/questions/15840834/#" data-val="1-1">Add Category</a></li> <li><a href="http://stackoverflow.com/questions/15840834/#" data-val="1-2">Add Sub-category</a></li> </ul> </li> <li><a href="http://stackoverflow.com/questions/15840834/#">Process Order</a> <ul> <li><a href="http://stackoverflow.com/questions/15840834/#" data-val="2-1">Ship Order</a></li> <li><a href="http://stackoverflow.com/questions/15840834/#" data-val="2-2">Change Order Status</a></li> </ul> </li> <li><a href="http://stackoverflow.com/questions/15840834/#">Reports</a> <ul> <li><a href="http://stackoverflow.com/questions/15840834/#" data-val="3-1">Orders by station</a></li> <li><a href="http://stackoverflow.com/questions/15840834/#" data-val="3-2">Orders by date</a></li> <li><a href="http://stackoverflow.com/questions/15840834/#" data-val="3-3">Pending Orders</a></li> </ul> </li> <input id="shareto" type="hidden" name="shareto"> </ul> </td> </tr> </table> </form>\[/code\]
 
Back
Top