Hi Everyone,
I have a custom button on my list page. I want to use this button to display a popup asking for user input, and then assigning the input received to a specific field of all the selected records.
This is the coding that I have on my button, but I can't get it to work:
button client:
var val=prompt("Please enter an invoice number","xxxxx");
params["invoiceno"] = $("#invoiceno").val();
button server:
global $dal;
for ($i=0; $i<count($keys); $i++)
{
$sql = "Update waybills set Invoice
=".$params["invoiceno"]." where ID=" . $keys[$i]["ID"];
CustomQuery($sql);
}
$result["txt"] = "Records were updated.";
Any help will really be appreciated!