You need to sign in to do that
Don't have an account?
Sateesh Kumar
PopUP Box on Standard Page after Clicking on Save button
Hi,
I have requirement to show a popup box after clicking on the save button on standard page. when some XYZ field != Null, I achived this by creating a visualforce page but the problem here is the POPUP shows on (Onload or Refresh) of a page. I need to stop the popup on onload. How can i achieve this. Below is my code.
<apex:page standardController="Account" rendered="{!IF(((Account.Type='Dealer' || Account.Type='Flooring Dealer'|| Account.Type='Distributor'||Account.Type='Distributor - IBU'||Account.Type='Retail / DIY' ) && (Account.Account_Status__c = 'Current Customer') && (Account.distributor_locator_relevant__c = 'Yes') && (Account.distributor_locator_movex_ad_number__c = Null || Account.distributor_locator_movex_ad_number__c = '')) ,true,false)}">
<script type = "text/javascript">
callMe();
//window.onload=function()
{
var url = window.location.href;
alert(url.indexOf('/006') + ' hiii '+url.indexOf('/e'));
if(url.indexOf('/006')!=-1 && url.indexOf('/e')!=-1)
{
alert('test');
}
}
if($('#save').click())
{
function callMe()
{
var result = confirm("Do you want this location to display in the Dealer Locator on the website? You’ve checked the Distributor Locator Relevant? box, which usually means you want that.Right now, there’s no DL Movex AD number in the distributor locator section of the website - that’s the number that shows that we’re delivering products that reach this location.Without that number, this location won’t show up on the website in the Distributor Locator.Please work with Customer Service to get this fixed.");
if(result) window.parent.location.href = '/{!Account.Id}/e?retURL={!Account.Id}';
}
}
</Script>
</apex:page>
I have requirement to show a popup box after clicking on the save button on standard page. when some XYZ field != Null, I achived this by creating a visualforce page but the problem here is the POPUP shows on (Onload or Refresh) of a page. I need to stop the popup on onload. How can i achieve this. Below is my code.
<apex:page standardController="Account" rendered="{!IF(((Account.Type='Dealer' || Account.Type='Flooring Dealer'|| Account.Type='Distributor'||Account.Type='Distributor - IBU'||Account.Type='Retail / DIY' ) && (Account.Account_Status__c = 'Current Customer') && (Account.distributor_locator_relevant__c = 'Yes') && (Account.distributor_locator_movex_ad_number__c = Null || Account.distributor_locator_movex_ad_number__c = '')) ,true,false)}">
<script type = "text/javascript">
callMe();
//window.onload=function()
{
var url = window.location.href;
alert(url.indexOf('/006') + ' hiii '+url.indexOf('/e'));
if(url.indexOf('/006')!=-1 && url.indexOf('/e')!=-1)
{
alert('test');
}
}
if($('#save').click())
{
function callMe()
{
var result = confirm("Do you want this location to display in the Dealer Locator on the website? You’ve checked the Distributor Locator Relevant? box, which usually means you want that.Right now, there’s no DL Movex AD number in the distributor locator section of the website - that’s the number that shows that we’re delivering products that reach this location.Without that number, this location won’t show up on the website in the Distributor Locator.Please work with Customer Service to get this fixed.");
if(result) window.parent.location.href = '/{!Account.Id}/e?retURL={!Account.Id}';
}
}
</Script>
</apex:page>
This way the only the click will fire the javascript function