This topic is locked

Assign a value from an input box to multiple selected records - only accepts numbers

12/2/2012 8:38:16 PM
PHPRunner General questions
D
DUKE author

As an alternative solution to my question posted previously I have the following. It works perfectly with numbers, but won't accept alphanumeric input.
What can I do to get it to also accept alphanumeric input?
List Page:
<INPUT id=tagtoadd>
button before:
params["tagtoadd"] = $("#tagtoadd").val();
button server:
global $dal;

for ($i=0; $i<count($keys); $i++)

{

$sql = "Update waybills set Status=".$params["tagtoadd"]." where ID=" . $keys[$i]["ID"];

CustomQuery($sql);

}

$result["txt"] = "Records were updated.";
javascript onload event:
this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){
var val = $("#tagtoadd").val();
formObj.baseParams['tagtoadd'] = val;
});