function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
StaciStaci 

alert message in Apex Page not popping up

I found this on a blog that used it for Opportunities,  I massaged it to use in Cases, but I cannot get it to pop up the message.

<apex:page standardController="Case" rendered="{!Case.Impact__c = 'Site Production Down'}">

<script type="text/javascript">
{
    window.alert{"This is an alert");
}

</script>

</apex:page>

 I added the VF Page to my page layout, created a case to meet the criteria and saved the case, no pop up.  Am I missing something?

Best Answer chosen by Admin (Salesforce Developers) 
testrest97testrest97
'window.alert(' instead of' window.alert{'
&lt;script type="text/javascript">
{
window.alert("This is an alert");
}

All Answers

testrest97testrest97
'window.alert(' instead of' window.alert{'
&lt;script type="text/javascript">
{
window.alert("This is an alert");
}
This was selected as the best answer
StaciStaci
Thank you testrest, sometimes it just takes a second pair of eyes!