Run PHP class from JavaScript
        Posted  
        
            by jarus
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by jarus
        
        
        
        Published on 2009-02-27T08:27:16Z
        Indexed on 
            2010/06/11
            23:13 UTC
        
        
        Read the original article
        Hit count: 303
        
I need to fire a php class from a javascript function.
code:
<input type="button" name="Submit" value="Submit" class="opinionbox" 
onclick="verifyControl('<?=$control_no?>')"/>
function verifyControl(rNo) {
 Cont_no=document.getElementById("ContNo").value;
  if(rNo==Cont_no) {
    frames['frame1'].print();
    showPage('payment');
  }
  else if(rNo!=Cont_no) {
    alert("invalid  control no");
  } 
}
i need to run the code
$data = $obj_com -> getSelectedData('tbl',
                      'control_no', $contno);
$control_no = $contno;
$obj_com -> recordPay('tbl',$contno);
inside the verifyControl() how can I do this?
© Stack Overflow or respective owner