G
Guest
Hi,
I'm trying to call a Javascript function within a foreach loop. I am loop
over a series of users and I want to call the JS function which opens a new
window, passing in the user id to each call for the JS function.
So far I've done this:
foreach (USER _user in users)
{
string jscriptString = "<script language='JavaScript'>";
jscriptString += "pdfWinOpen(" + _user.userID + ");";
jscriptString += "</script>";
Response.Write(jscriptString);
}
But I can't seem to get the javascript to fire. File which opens in the new
window has a window.close(); in body onload method. So I easily close the
opened window.
How can I fire off the open window JS event?
Thanks
Stephen
I'm trying to call a Javascript function within a foreach loop. I am loop
over a series of users and I want to call the JS function which opens a new
window, passing in the user id to each call for the JS function.
So far I've done this:
foreach (USER _user in users)
{
string jscriptString = "<script language='JavaScript'>";
jscriptString += "pdfWinOpen(" + _user.userID + ");";
jscriptString += "</script>";
Response.Write(jscriptString);
}
But I can't seem to get the javascript to fire. File which opens in the new
window has a window.close(); in body onload method. So I easily close the
opened window.
How can I fire off the open window JS event?
Thanks
Stephen