Hi,
I'm trying to update multiple records from List Page & using Ver 8.1
This what my code snippet looks like and the pull down menu looks correct.
$str= "<select id='mycontrol'><option value=''>Select a Reg_No</option>";
global $conn;
$strSQL = "select Reg_No from Daily_Manifest";
$rs = db_query($strSQL,$conn);
while ($data = db_fetch_array($rs))
$str.="<option value='".$data["Reg_No"]."'>". $data["Reg_No"]."</option>";
$str.="</select>";
echo $str;
My Client Before from the List Page is..
if ($("#mycontrol").val()=="") {
alert('Choose something already');
return false;
}
// send the selected value to OnServer event
params['Reg_No']=$("#mycontrol").val();
My Server is...
global $dal;
while ( $data = $button->getNextSelectedRecord() )
{
$sql = "Update Manifest set Reg_No=('".$params['Reg_No']."')
where Waybill=".$data["Waybill"];
CustomQuery($sql);
}
& lastly my Client After is...
location.reload();
After a lengthy search on forum I just couldn't succeed. It just won't populate the "Reg_No" field after multiple select of radio buttons on the left. Even when selecting a single record. Even running the JavaScript troubleshooting didn't help. Too much of a novice.
Any assistance will be appreciated.
Thanks
MT