PLEASE HELP...
Here is what I am trying to do...
I have an ASP page that has two frames. One hidden and the other visible. On the visible frame, I am basically looping through a list of URLs. These URLs are basically for different ASP pages that do some client side printing. I am setting the location.href property of the hidden frame to call the asp page for printing. I am having two problems with it.
1- it loops through all URLs executing location.href command but only the last one actually makes it through.
2- I want to close the window when all URLs have been looped through. top.close() function executes too soon. and nont of the location.href work. (the above #1 only works when I remove top.close)
here is the code...
Here is what I am trying to do...
I have an ASP page that has two frames. One hidden and the other visible. On the visible frame, I am basically looping through a list of URLs. These URLs are basically for different ASP pages that do some client side printing. I am setting the location.href property of the hidden frame to call the asp page for printing. I am having two problems with it.
1- it loops through all URLs executing location.href command but only the last one actually makes it through.
2- I want to close the window when all URLs have been looped through. top.close() function executes too soon. and nont of the location.href work. (the above #1 only works when I remove top.close)
here is the code...
Code:
function window_onload() {
var l_strAllURL;
l_strAllURL = document.all("chkURL");
if (typeof l_strAllURL[0] == "object"){
for (var l_lngIdx = 0; l_lngIdx < l_strAllURL.length; l_lngIdx++){
if (l_strAllURL[l_lngIdx].checked == false){
l_strAllURL[l_lngIdx].checked = true;
window.parent.fraPrintPage.location.href = l_strAllURL[l_lngIdx].value;
}
}
}
top.close();
}