i have 2 tables bank master and branch details having bankcode as a common feild .
i have designed a form in which i am filtering branches according to a particular bank code using ajax , i an fine till this ..... now i want that fields of these records should come in a separate field so that i can change my data there itselfe and using ajax can update database on onblur event ...... how to do this ?
this is my code for displaying information about banches having similar bank_code
[PHP]elseif($name == "select_bank_co de")
{
$sql="SELECT * FROM bankbranches WHERE bank_code = '".$q."'";
$result = mysql_query($sq l);
echo "<table width='100%'>";
$i=0;
while($row = mysql_fetch_arr ay($result))
{
$bcode = $row['bank_code'] ;
$brcode = $row['branch_code'] ;
$badd = $row['branch_address '] ;
$pin = $row['branch_address '] ;
$bc = "bank_code" ;
echo "<input name='branch_co de[$i]' type='hidden' value='$row[branch_code]'/>";
echo "<tr><td>Ba nk Code </td><td><input type='text' name='bcode[$i]' value='".$bcode ."' onblur='modufy_ rec('".$bcode." ','".$brcode."' ,this.value,'ba nk_code');'></td>";
echo "<tr><td>Br anch Code </td><td><input type='text' name='brcode[$i]' value='".$brcod e."' onblur='modufy_ rec('".$bcode." ','".$brcode."' ,this.value,'br anch_code');'></td>";
echo "<tr><td>Br anch address </td><td><input type='text' name='baddress[$i]' value='".$badd. "' onblur='modufy_ rec('".$bcode." ','".$brcode."' ,this.value,'br anch_address'); '></td>";
echo "<tr><td>Pincod e </td><td><input type='text' name='pincode[$i]' value='".$pin." ' onblur='modufy_ rec('".$bcode." ','".$brcode."' ,this.value,'pi ncode');'></td>";
$i+1;
}
echo "</table>";
}[/PHP]
Using this i am getting values displayed but onblur is not working , this fuction takes necessary fields for generating query and this is javascript function which calls PHP ultimatly
i have designed a form in which i am filtering branches according to a particular bank code using ajax , i an fine till this ..... now i want that fields of these records should come in a separate field so that i can change my data there itselfe and using ajax can update database on onblur event ...... how to do this ?
this is my code for displaying information about banches having similar bank_code
[PHP]elseif($name == "select_bank_co de")
{
$sql="SELECT * FROM bankbranches WHERE bank_code = '".$q."'";
$result = mysql_query($sq l);
echo "<table width='100%'>";
$i=0;
while($row = mysql_fetch_arr ay($result))
{
$bcode = $row['bank_code'] ;
$brcode = $row['branch_code'] ;
$badd = $row['branch_address '] ;
$pin = $row['branch_address '] ;
$bc = "bank_code" ;
echo "<input name='branch_co de[$i]' type='hidden' value='$row[branch_code]'/>";
echo "<tr><td>Ba nk Code </td><td><input type='text' name='bcode[$i]' value='".$bcode ."' onblur='modufy_ rec('".$bcode." ','".$brcode."' ,this.value,'ba nk_code');'></td>";
echo "<tr><td>Br anch Code </td><td><input type='text' name='brcode[$i]' value='".$brcod e."' onblur='modufy_ rec('".$bcode." ','".$brcode."' ,this.value,'br anch_code');'></td>";
echo "<tr><td>Br anch address </td><td><input type='text' name='baddress[$i]' value='".$badd. "' onblur='modufy_ rec('".$bcode." ','".$brcode."' ,this.value,'br anch_address'); '></td>";
echo "<tr><td>Pincod e </td><td><input type='text' name='pincode[$i]' value='".$pin." ' onblur='modufy_ rec('".$bcode." ','".$brcode."' ,this.value,'pi ncode');'></td>";
$i+1;
}
echo "</table>";
}[/PHP]
Using this i am getting values displayed but onblur is not working , this fuction takes necessary fields for generating query and this is javascript function which calls PHP ultimatly
Comment