|
Hi,
i have a problem in the code mentioned below, the variable "strBeneficiaryName" has a single quote (For eg: Mc O' Neal) which is passed as a parameter in the query string.
My doubt is whether the function Page.RegisterClientScriptBlock("OnLoad",strJavascript); handles single quote.
This problem doesnt come if i use a Modal window.
How can this be handled using a Modless window.
{
//Construct the script and open the page by registering the script
string strBenficiaryId=Session["CurrentBeneficiaryId"].ToString().Trim();
string strBeneficiaryName=Session["CurrentBeneficiaryName"].ToString().Trim();
int intEntityTypeCode=5;
string strJavascript="";
strJavascript+= "<SCRIPT LANGUAGE='JavaScript'>";
string strQuery="/PABASUI/PABASPREMIERPPOUI/PABASPREMIERPPONOTESUI/PPONotNotesDetails_strCSR_CSR_ampEntityId_.html"+strBenficiaryId+"&EntityName="+strBeneficiaryName+"&EntityTypeCode="+intEntityTypeCode;
strJavascript+="window.open('" + strQuery+ "','_blank','status=0,menubar=0,left=0,top=20,width='+(window.screen.width-8)+',height='+(window.screen.availHeight-130)+' ,scrollbars=0,resizable=0,toolbar=0,maximize=0');";
strJavascript+="</SCRIPT>";
Page.RegisterClientScriptBlock("OnLoad",strJavascript);
}
|
|
|
|
|
|
|
// |