You need to sign in to do that
Don't have an account?
Pooja Nekkalapudi
How to pop up a alert
How to pop up a alert and have a check box "is alert shown " update to true once the user reads the pop - up
so far i have
class:
public class PopUpAlert
{
public Opportunity opp;
public PopUpAlert(ApexPages.StandardController controller){
Opportunity opp = (Opportunity)controller.getRecord();
opp=[select id,isAlertShown__c from Opportunity where Id=: opp.ID];
}
public void setAlertVal(){
opp.isAlertShown__c = true;
update opp;
}
}
VFpage:
<apex:page standardcontroller="Opportunity" extensions="PopUpAlert" >
<html><head>
<apex:form > <apex:actionFunction name="setAlertVal" action="{!setAlertVal}" />
<script type="text/javascript"> var msg="FYI test : confidential info";
if ( {!Opportunity.isAlertShown__c} == false)
{
alert(msg); setAlertVal();
} </script> </apex:form> </head>
window.onload = throwalert;
</html> </apex:page>
this does check the box
any ideas?
so far i have
class:
public class PopUpAlert
{
public Opportunity opp;
public PopUpAlert(ApexPages.StandardController controller){
Opportunity opp = (Opportunity)controller.getRecord();
opp=[select id,isAlertShown__c from Opportunity where Id=: opp.ID];
}
public void setAlertVal(){
opp.isAlertShown__c = true;
update opp;
}
}
VFpage:
<apex:page standardcontroller="Opportunity" extensions="PopUpAlert" >
<html><head>
<apex:form > <apex:actionFunction name="setAlertVal" action="{!setAlertVal}" />
<script type="text/javascript"> var msg="FYI test : confidential info";
if ( {!Opportunity.isAlertShown__c} == false)
{
alert(msg); setAlertVal();
} </script> </apex:form> </head>
window.onload = throwalert;
</html> </apex:page>
this does check the box
any ideas?