rk_7564 - Thursday, January 5, 2012 4:47 AM:
Hi,
i am getting the N number of Barcode in one MultiLine TextBox and assign this Barcode into array variable. I want check this barcode with system, whether the barcode is available or not ?.
Pls take a look on my below code(JavaScript). If i enter 5 values into Multiline TextBox means, the alert message showing first four records are not found & the last one is found.
pls guide me...
Regards,
RK
//--------------------------------------------------------------------------------------------------------------------------------
var inno = new Innovator();
var rfid = document.getElementsByName("rfid").item().value;
var myrfid = rfid.split(" ");
for(i = 0; i < myrfid.length; i++)
{
var bar_no = inno.newItem("ST_NEW_INSTRUMENT","get");
var b = myrfid[i].toString();
bar_no.setProperty("bar_no",b);
var bar_no1 = bar_no.apply();
alert(b);
if(bar_no1.isError())
{
alert("BarCode Number not Found");
}
else
{
alert("BarCode Found");
}
}
return ;
aknourenko - Friday, January 13, 2012 12:07 PM:
I suspect first 4 contains some extra symbols (e.g. spaces or " ") that are left there after "split(..)" call; as the result no matching items were found (of course, I assume that all 5 bar codes really exist in the database).