I am trying to call the web method from java script function.
If i put alert() it works fine. with out it web method doesnt get called.
Please find the code block below
if ( confirm( "You are about to assign a person to a role. Following changes will be commited: \n" +
"\t- Finished Activities and Tasks keep the name of previously assigned person (if any) \n" +
"\t- New user is notified of new responsibilities via email\n\n" +
"Do you want to continue?"))
{
aRetArray[1]=oForm.cmbPersons.options[oForm.cmbPersons.selectedIndex].value;
sParam = <%=iProjectRoleID%> + '¤' + aRetArray[1] + '¤' + <%=intProjectId%>
// >> Call webservice >>
iPCPWeb.iPCPint.AssignResponsiblePerson(sParam, OnAssignResponsiblePersonSuccess,OnRunWebServiceFaild);
// << Call webservice <<
}}
I tried using settimeout and moved all script inside <head> tag.
Nothing worked.