Click does not trigger form input :(
Hello everyone ;)
I was wander whether someone one could help me with my problem
I have the following code which triggers below form
- <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- $("#processing").live("click", function(){
-
- var proid = $("#proid").val();
- var oid = $("#oid").val();
- $.post("orderstatus.php", { proid : proid, oid : oid }, function(data) {
- $("#update").html(data);
- });
- return false;
- });
- });
- </script>
This is my form
- <form id="statusform" name="statusform" method="post">
- <table width="507" height="64" border="0" align="left">
- <tr>
- <td colspan="3" align="center">
- <div id="update" align="center"></div>
- </td>
- </tr>
- <tr>
- <td width="173" align="center">
- <input type="button" name="processing" id="processing" value="PROCESSING ORDER" />
- <input type="hidden" name="proid" id="proid" value="processing" />
- <input type="hidden" name="oid" id="oid" value="<?php $ui=$_GET['oid']; echo $ui; ?>" />
- </td>
- <td width="167" align="center">
- <input type="button" name="processed" id="processed" value="ORDER PROCESSED"/>
- <input type="hidden" name="oproid" id="oproid" value="processed" /></td>
- <td width="147" align="center">
- <input type="button" name="delete" id="delete" value="DELETEORDER" />
- <input type="hidden" name="deleteo" id="deleteo" value="delete" />
- </td>
- </tr>
- </table>
- </form>
orderstatus.php includes this
- <?php
- //Update the status of the site.
- $orderid=$_POST['oid'];
- $processing=$_POST['proid'];
- $processed=$_POST['oproid'];
- $delete_order=$_POST['deleteo'];
- if($processing)
- {
- $update=mysql_query("UPDATE shop_detail SET orderstatus='$processing' WHERE s_id='$orderid'");
- echo "<font size='3' color='#333' face='Geneva, Arial, Helvetica, sans-serif'>Order updated to processing.</font>";
- }
The problem I am having is that when I click the button nothing happens :(
Can someone advice what i am doing wrong please ;)
Kind Regards;
Arek