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
surekha Ksurekha K 

i want to add the styles for alert window in visualforce page

Hi,

  I want to add the styles for text and alert window.

The below code is showing like normal window.Now i want to add some styles for that.
Can anyone please help on this.

<apex:page standardController="Opportunity">
  <apex:form >
      <script>
          window.document.onload = new function(e)
          {
              if({!Opportunity.StageName=='Order Won' }){     
                alert("Please re-check the opportunity data once, ensuring all the fields are filled to the best of your knowledge.\n\nYour corrections here can significantly improve our Sales insights (win-loss etc.)");
                }
          }
      </script>
  </apex:form>
</apex:page>

Many Thanks

Regards,
Surekha
Prafull G.Prafull G.
Surekha,

You can use jQuery modal dialog to have customized alert box on visualforce.

Or there is another good example using salesforce components.
http://www.tehnrd.com/visualforce-pop-up/

You can simply use javascript to show/hide the output panel based on your logic.
surekha Ksurekha K
Hi Prafull,

Thanks for your valuable reply...
 
I gone through those examples but those all shown on visualforce page not on standard page..
But i want to show on standard page based on the condition.

I just want to change the look and feel is different as normal alert box.
If it is not to much can you please add the logic as for my requirement.

Regards,
Surekha