0

I'm trying to show a pop up message when a field equals a value. I used a javascript alert for this, but when the page loads the message displays for a few seconds and disappears. The only way I've found to work around this is to add a delay on load. Is there a better way to serve up a pop up in salesforce, or is there a better solution than delaying the pop up by 5 seconds while everything loads on the page?

<apex:page standardController="Account">
<script type="text/javascript">
    if({!Account.EA_Credit_Hold__c == TRUE}){
        setTimeout(function(){alert("ACCOUNT ON HOLD");},5000);
        }
</script>
</apex:page>
  • What are you trying to accomplish? What have you done? and what is the problem? Your question only shows us one solution to what ever the problem is. – gNerb Jun 14 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.