Originally posted by Murad Iqbal:
is the method i am calling on onclick inside the image source tag. The function i am calling is:
function editGroupAccess(editGroupAccessId)
{
setCmd('assignAccess');
document.frmReport.submit();
}
Kindly inform, what is the method to call this function in a written in a jsp file when a button is clicked. There are rows in a table which have these buttons on which i am planting the onclick function. The parameter passed to the method called in the onclick cant be a scriptlet? Any alternate ways?
If i have properly understood u r question, this could be u r answer.
U can use scriplets inside u r javascript function call as follows
<A href='editGroupAccess("<%=editGroupAccessId%>")'><img src="C:\Documents and Settings\murad\Desktop\onclicktag.jpg"/></A>
Where editGroupAccessID is a
java variable which can be initialized to certain value using normal java code. It will be replaced by normal javaScript function parameter when page is converted to html.