Speedpacket.gma,
Thanks for your reply,
I took you advice and tried the php code which did have a minor error. However still was not populating the input#paymentamount_field field. The correct php code is:
- require_once('_include/maininclude.php');
- $TypeOfCoverID = $_POST['typeofcover_field'];
- $SQL = "SELECT * FROM tbltypeofcover WHERE typeOfCoverID = '$TypeOfCoverID'";
- $Result = mysql_query($SQL) or die("Client Details not fetched: ".mysql_error()."<br>SQL:$SQL");
- $Row = mysql_fetch_array($Result);
-
- $TypeOfCover = $Row['typeOfCover'];
- $Cost = $Row['Cost'];
- $LandlordPackage = $Row['landlordPackage'];
-
- $arr = array('input#paymentamount_field' => $Cost);
- echo json_encode( $arr );
To test this code i browsed to the file client.add.contract_json.php and got the result: {"input#paymentamount_field":null},
so i decided to change the SQL to $SQL = "SELECT * FROM tbltypeofcover WHERE typeOfCoverID = '5'"; and got a result of {"input#paymentamount_field":"180.00"}
which is correct, but still not populating the input#paymentamount_field...
So i seem to have 2 problems, first of all the query is not being populated with the typeofcover_field, and secondly the result is not being passed back to the input#paymentamount_field...
Thanks again...