try
{
//if related articles exist ?
if(window.location.pathname.indexOf("656089") != -1){console.log("hedva connatix");document.getElementsByClassName("divConnatix")[0].style.display ="none";}
int i;
for (i = 0; i < MAX_RELATED_ARTICLES && !string.IsNullOrEmpty((FindControl("txtRelated" + (i + 1).ToString()) as System.Web.UI.WebControls.TextBox).Text); i++) ;
//if related articles exist and the postion of related articles is empty.
if (i < MAX_RELATED_ARTICLES && string.IsNullOrEmpty(txtBeforeParagraphRelated.Text))
{
reqfBeforeParagraphGallery.Enabled =
true;
PopBox.Attributes.Add(
"class", "PopBoxError");
lblAllert.Text =
"Required field Related Articles - 'Before Paragraph' is missing.";
ClientScript.RegisterStartupScript(
this.GetType(), "key", "launchModal();", true);
return;
}
}
catch (Exception ex)
{
}