On change of the dropdown list, A php function should called.
Inside the PHP function I will do some calculation. Later I need to set the value of a text box or else that PHP function should return a value that value shoul be catch in the javascript and set that valu to the textbox control.
My html function is
<select name="sltLeaveType" id="sltLeaveType" class="formSelect" onchange="TotalCountsOfPL(this.value)">
<?php
<option></option>
<option></option>
</select>
And in PHP function is placed in D:/Project/EmployeeDetails/EmpLeave.php
class clsGetTotalPL
{
function GetTotalPL($EmployeeId)
{
$query = "select count(leave_request_id) from hs_hr_leave_requests where leave_type_id='LTY002' AND employee_id=".$EmployeeId.";";
return $query;
}
So now please [prvide me the JQuery function to call this Php function
to get call the GetTotalPL() function on every change on the the dropdownlist.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…