You need to sign in to do that
Don't have an account?
Bob
Visualforce page with java popup message.
I have a popup message using visualforce and java. I only need the message to popup once during a session but everytime someone clicks away from the record and clicks back the message keeps popping up. Is there something I can add to my code below that will make this message popup once?
<apex:page standardController="Case">
<script type="text/javascript">
var s = "";
var a = "{!JSENCODE(Case.Account.Alert_Message__c)}";
if (a.length > 0)
{
s += "Account Alert: " + a + "\n";
}
if (s.length > 0)
{
window.alert(s);
}
</script>
</apex:page>
<apex:page standardController="Case">
<script type="text/javascript">
var s = "";
var a = "{!JSENCODE(Case.Account.Alert_Message__c)}";
if (a.length > 0)
{
s += "Account Alert: " + a + "\n";
}
if (s.length > 0)
{
window.alert(s);
}
</script>
</apex:page>
Hi Bob,
Use a boolen function and update the code if fired once, if fired again do not enter the loop to execute.
See some sample code in the link below,
http://salesforce.stackexchange.com/questions/34328/view-pop-up-data
Regards,
Ashish