-
return false;
}
else
{
return true;
document.cancel_complaints.submit();
}
}
----------
in case of one row(i.e only one record i.e only one checkbox) the value of lenvar is undefined and if there are more than one row the value of lenvar comes= (no of checkboxes)
i am unable to understand why there is problwm in counting in total no of checkboxes.
if somebody has solution then plz tell me.
thanks in advance">I have a cancel_complaints page in ASP in which list of complaints r coming (2 records come at a time means page navigation).In that page some information is coming in table and i have given a checkbox in one Table column according to records in database table rows are generated.That is multiple checkbox are generated with same name.I have put a validation that if user has selecetd none of checkbox alert message comes.Problem is that when there are more than one row validation is going fine but when only one row remains validation does not goes fine.Below i am giving javascript function that i have used for validation.----------function------------function validatefield(){ var j=0; var lenvar=document.cancel_complaints.chksel.length; //alert(eval(lenvar)); for (i = 0; i < lenvar; i++) {if(document.cancel_complaints.chksel[i].checked) { j=j+1; } } if(j==0) { alert("Please select atleast one checkbox"); return false; } else { return true; document.cancel_complaints.submit(); }}----------in case of one row(i.e only one record i.e only one checkbox) the value of lenvar is undefined and if there are more than one row the value of lenvar comes= (no of checkboxes)i am unable to understand why there is problwm in counting in total no of checkboxes.if somebody has solution then plz tell me.thanks in advance
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
How do I have the JSP-generated servlet subclass my own custom servlet class, instead of the default?
One should be very careful when having JSP pages extend custom servlet classes as opposed to the default one generated by the JSP engine. In doing so, you may lose out on any advanced optimization that may be provided by the JSPengine. In any case, your new superclass has to fulfill the contract with the JSPngine by: Implementing the HttpJspPage interface, if the protocol used is HTTP, or implementing...
-
How do I use comments within a JSP page?
You can use "JSP-style" comments to selectively block out code while debugging or simply to comment your scriptlets. JSP comments are not visible at the client.For example:<%-- the scriptlet is now commented out<%out.println("Hello World");%>--%>You can also use HTML-style comments anywhere within your JSP page. These comments are visible at the client. For example:<!-- (c) 2004 javagalaxy.com...
-
-
JSP Interview Questions
Ans