|
private void IsChecked ()
{
string jsScript = "<script language = JavaScript>\n"
+ "<!-\n"
+ "function IsChecked (frm) {\n"
+ "var chkNum = 0;\n"
+ "// loop through all elements\n"
+ "for (i = 0; i <frm.length; i ++) {\n\n"
+ "// Look for our checkboxes only\n"
+ "if (frm.elements [i] .name.indexOf ('chkChoose')! =-1) {\n"
+ "// selected record\n"
+ "if (frm.elements [i] .checked) {\n"
+ "chkNum = chkNum +1;\n"
+ "}\n"
+ "}\n"
+ "}\n"
+ "if (chkNum == 0) {\n"
+ "alert ('Please select asset extension attributes!');\n"
+ "return false;}\n"
+ "}\n\n\n"
+ "//->\n"
+ "</ script>";
if (! IsClientScriptBlockRegistered ("clientScript"))
{
// test if the script of this ID has been registered, if it is not registered yet
Page.RegisterClientScriptBlock ("clientScript", jsScript);
}
// --------- End of modification record ----------
} |
|