Hi,
private void Page_Load(objec t sender, System.EventArg s e)
{
System.Text.Str ingBuilder strBuilder = new System.Text.Str ingBuilder();
strBuilder.Appe nd ("<script language=JavaSc ript> ");
strBuilder.Appe nd ("<!--");
strBuilder.Appe nd ("var intWidth = window.screen.a vailWidth - 40;");
strBuilder.Appe nd ("var intHeight = window.screen.a vailHeight - 60;");
strBuilder.Appe nd ("var strHrf;");
//DoD function
strBuilder.Appe nd ("function DoDClick(Site) {");
strBuilder.Appe nd ("window.event. returnValue = false;");
strBuilder.Appe nd ("if (Site == 'SHIP'){");
strBuilder.Appe nd ("strHrf = 'Ship/ShDoD.htm';}");
strBuilder.Appe nd ("else{");
strBuilder.Appe nd ("strHrf = 'DoD.aspx';}");
strBuilder.Appe nd ("newWindow(Sit e, 'DoD', intHeight, intWidth, true,
false, true, false);}");
strBuilder.Appe nd ("function SiteClick(Site) {");
strBuilder.Appe nd ("window.event. returnValue = false;");
strBuilder.Appe nd ("if (Site == 'SHIP'){");
strBuilder.Appe nd ("strHrf = 'Ship/ShDefaultShip.h tm';}");
strBuilder.Appe nd ("else{");
strBuilder.Appe nd ("strHrf = 'DefaultShore.h tm';}");
strBuilder.Appe nd ("newWindow(str Hrf, 'RADWeb', intHeight, intWidth,
true, false, true, false);}");
strBuilder.Appe nd ("-->");
strBuilder.Appe nd ("</script>");
string js = strBuilder.ToSt ring();
if (!IsClientScrip tBlockRegistere d("DoDClick") )
{
RegisterClientS criptBlock("DoD Click", js);
}
if (!IsClientScrip tBlockRegistere d("SiteClick" ))
{
RegisterClientS criptBlock("Sit eClick", js);
}
}
------------------------------
Everything looks good. No error.
Also get
IsClientScriptB lockRegistered = true
No Javascript is genrated when I view source code.
Not sure what I am doing wrong.
Thanks,
- Reena
private void Page_Load(objec t sender, System.EventArg s e)
{
System.Text.Str ingBuilder strBuilder = new System.Text.Str ingBuilder();
strBuilder.Appe nd ("<script language=JavaSc ript> ");
strBuilder.Appe nd ("<!--");
strBuilder.Appe nd ("var intWidth = window.screen.a vailWidth - 40;");
strBuilder.Appe nd ("var intHeight = window.screen.a vailHeight - 60;");
strBuilder.Appe nd ("var strHrf;");
//DoD function
strBuilder.Appe nd ("function DoDClick(Site) {");
strBuilder.Appe nd ("window.event. returnValue = false;");
strBuilder.Appe nd ("if (Site == 'SHIP'){");
strBuilder.Appe nd ("strHrf = 'Ship/ShDoD.htm';}");
strBuilder.Appe nd ("else{");
strBuilder.Appe nd ("strHrf = 'DoD.aspx';}");
strBuilder.Appe nd ("newWindow(Sit e, 'DoD', intHeight, intWidth, true,
false, true, false);}");
strBuilder.Appe nd ("function SiteClick(Site) {");
strBuilder.Appe nd ("window.event. returnValue = false;");
strBuilder.Appe nd ("if (Site == 'SHIP'){");
strBuilder.Appe nd ("strHrf = 'Ship/ShDefaultShip.h tm';}");
strBuilder.Appe nd ("else{");
strBuilder.Appe nd ("strHrf = 'DefaultShore.h tm';}");
strBuilder.Appe nd ("newWindow(str Hrf, 'RADWeb', intHeight, intWidth,
true, false, true, false);}");
strBuilder.Appe nd ("-->");
strBuilder.Appe nd ("</script>");
string js = strBuilder.ToSt ring();
if (!IsClientScrip tBlockRegistere d("DoDClick") )
{
RegisterClientS criptBlock("DoD Click", js);
}
if (!IsClientScrip tBlockRegistere d("SiteClick" ))
{
RegisterClientS criptBlock("Sit eClick", js);
}
}
------------------------------
Everything looks good. No error.
Also get
IsClientScriptB lockRegistered = true
No Javascript is genrated when I view source code.
Not sure what I am doing wrong.
Thanks,
- Reena
Comment