Question

10
Replies
6882
Views
abhishekisanand Member since 2015 2 posts
Virtusa Consulting services pvt. Limited
Posted: 4 years ago
Last activity: 4 years 4 months ago
Closed

How to close current tab on click of submit in modal dialog?

I have a requirement in which I need to close the current tab on click of a button in the modal dialog.

the below script is working fine in Pega 6 version but does not work in Pega 7

function closeCurrentTab()

  {

  try{

  var confirmId2 = document.getElementById("ConfirmVoid");

  if(confirmId2.value!="Reject")

  {

  if(typeof(event)=="undefined")

  event=window.event;

  pega.u.d.doModalAction(pega.u.d.submitModalDlgParam,event);

  var activeTab=parent.pega.composite.container.tabDisplay.getCurrentTab();

  if(activeTab!=null){

  parent.pega.composite.container.tabDisplay.closeTab(activeTab);

  }

  }

  else{ pega.u.d.doModalAction(pega.u.d.submitModalDlgParam,event);

  }

  } catch(err){

  } }

Message was edited by: Lochan to add Category

User Interface
Moderation Team has archived post
Share this page LinkedIn