Currently, I am in the process of converting some older VBScript to Javascript for an ASP.NET project and there is a particular line that has me a bit stumped, as I am not entirely clear on its purpose.
The main function of the application is to allow users to input a new employee number into the database and then assign user permissions. The code I inherited is quite messy, but I am determined to get it functioning properly in Chrome.
Here is a snippet of the code that I have successfully translated so far:
if(form1.txtEmpno.value != ""){
var oOption;
oOption = document.createElement("OPTION");
oOption.text=form1.txtEmpno.value;
oOption.value=form1.txtEmpno.value;
form1.lstActive.add (oOption);
oOption = document.createElement("OPTION");
oOption.text="";
oOption.value="";
form1.lstPerms.add (oOption);
redim preserve arrUsers(1,ubound(arrUsers,2)+1);
arrUsers(0,ubound(arrUsers,2)) = form1.txtEmpno.value;
arrUsers(1,ubound(arrUsers,2)) = "";
form1.txtEmpno.value = "";
oOption = null;
}
And here is the specific line causing uncertainty:
redim preserve arrUsers(1,ubound(arrUsers,2)+1);