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
SS KarthickSS Karthick 

Problem in popup window

Hi folks
       Can anyone tell me why the popup is not working properly??

Code
<apex:page >
    <script>
        function showSimpleDialog(){   
           var sd = new SimpleDialog("Test"+Dialogs.getNextId(), false);   
           sd.setTitle("Test Pop up");  
           sd.createDialog();  
           window.parent.sd = sd;  
           sd.setContentInnerHTML("<p align='center'><img src='/img/msg_icons/warning32.png' style='margin:0 5px;'/></p><p align='center'>This is awesome!</p><p align='center'><br /><button class='btn' onclick='window.parent.sd.hide(); return false;'>cancel</button></p>");   
           sd.show();  
         } 
    

    </script>
   
    <apex:form >
        <apex:outputLink onclick="showSimpleDialog()">
            click to see popup
        </apex:outputLink>
    </apex:form>
</apex:page>


Problem is  the popup window is visble for 1 sec after clicking the link??

Please Help!
Best Answer chosen by SS Karthick
Jim JamJim Jam
Try changing your outputLink script to return false ..

ie.  <apex:outputLink onclick="showSimpleDialog(); return false;">

All Answers

Jim JamJim Jam
Try changing your outputLink script to return false ..

ie.  <apex:outputLink onclick="showSimpleDialog(); return false;">
This was selected as the best answer
Grazitti TeamGrazitti Team
Hi,

Please see the link below to resolve this issue.

http://blogforce9.blogspot.in/2014/01/simple-popup-in-salesforce-standard-vf.html


Please mark as best answer if it solves your problem.

Regards,
Grazitti Team,
www.grazitti.com