I need to specify in a function that if the value entered by the user is less then 6 digits then add 0's in front.
The function gets called when the user hits a button from the front-end.
This is the code I have so far...
function NextJobID()
{
var sSQL = "EXECUTE sp_JobValue 'JobID'";
rdcCOUNTER.executeSQL(sSQL);
var rsWork = rdcCOUNTER.getRecordset();
var nextID = rsWork.fields("COUNTER"
.Value;
txtJobID.value = '00' + nextID;
wiz.setData("JobID", txtJobID.value);
}
Any help will be greatly appreciated.
Thanks !!
The function gets called when the user hits a button from the front-end.
This is the code I have so far...
function NextJobID()
{
var sSQL = "EXECUTE sp_JobValue 'JobID'";
rdcCOUNTER.executeSQL(sSQL);
var rsWork = rdcCOUNTER.getRecordset();
var nextID = rsWork.fields("COUNTER"
txtJobID.value = '00' + nextID;
wiz.setData("JobID", txtJobID.value);
}
Any help will be greatly appreciated.
Thanks !!