i have a javascript function
function alertMe(len)
{
var fu1 = document.getElementById("FileUpload1");
var fu2 = document.getElementById("FileUpload2");
var fu3 = document.getElementById("FileUpload3");
var fu4 = document.getElementById("FileUpload4");
var myCars=new Array(fu1,fu2,fu3,fu4)
var l=0;
for(var i=0;i<myCars.length;i++)
{
if(myCars[i].value!=null)
l++;
}
if(len>6)
{
if(len==7 && l<=3)
window.location="uploo.aspx";
else if(len==8 && l<=2)
window.location="uploo.aspx";
else if(len==9 && l<=1)
window.location="uploo.aspx";
else
alert("you cant keep more than 10 files in your table,,delete some files first and then upload");
return false;
}
else
window.location="uploo.aspx";
}
this function gets a value len and based on that checks some conditions,,in addition to that i m trying to retrieve the IDs of four file upload controls,,the purpose is to get the number of files browsed,,the function does not give any errors but is not working properly.. suppose if len=7 and l=3,then it should call uploo.aspx but rather it shows me the alert messages..i want to know, is their any error in retrieving the value of l..