josephdts
asked on
JavaScript error
I have an old web site with the following script in aspx page. When I load the Solution into Visual Studio, it complains that the syntax function window.onload() is an error. How do I fix it and hat has changed?
function window.onload() {
var role = new String("<% =NMUser.Access%>");
var login = new String("<%=NMUser.LoggedFor %>");
document.login = login;
document.role = role;
var tblMain = document.getElementById("tblMain");
tblMain.greenBarIt = showGreenBar;
tblMain.clear = clearTable;
tblMain.greenBarIt();//showGreenBar();
tblMain.onmouseout=tblMain_onmouseOut;
tblMain.AddMailTo= addMailTo;
tblMain.AddMailTo();
document.Form1.txtPwd.onkeydown = txtPwd_onkeydown;
var cboPage = document.getElementById("cboPage");
cboPage.onchange = cboPage_onchange;
var txtLookup = document.getElementById("txtLookup");
txtLookup.tbl = tblMain;
txtLookup.onkeyup = txtLookupKeyUp;
txtLookup.onkeydown = txtLookupKeyDown;
var btnSearch = document.getElementById("btnSearch");
var anc_createNewMatter = document.getElementById("anc_createNewMatter");
anc_createNewMatter.onclick = anc_createNewMatter_Click;
btnSearch.txt = txtLookup;
btnSearch.onclick = btnSearchClikck;
document.forms[0].onsubmit = form_onsubmit;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.