+ Start a Discussion

Overlay when user logs in

Hi Guys,


I want to have a functionality like when user logs into the system. A pop up should be displayed (I want to use jquery dialog) asking Yes/No and below on that there should be a checkbox saying don't show it next time. How to achieve this? Is there any way to do it?






You could put an HTML component into the sidebar that includes a visualforce page via an iframe.  Then you would be able to programmatically determine if the user had seen the popup before (presumably via a custom field on the user object?) and decide whether to display the confirm dialog box or not.


The only wrinkle you might have is if the jquery dialog is different to a standard confirmation, i.e. if its a layer it may try to display bounded by the visualforce iframe.


Hey man!


Thanks for reply. I did, what you asked but it's not working. May be due to my problem. So here what am I exactly doing

1. Created a VF page. In this page I've some login in my controller which determines weather to show modal window or not. But problem is that I am unable to get reference of div(added as html component in home page layout) in parent window. I am using iframe. Below is my code. 


<apex:page id="thepage" showHeader="false" sidebar="false">

    <!-- Include JS files begins here -->
    <apex:includeScript value="{!URLFOR($Resource.JqueryUI, '/js/jquery-1.6.2.min.js')}" />
    <apex:includeScript value="{!URLFOR($Resource.JqueryUI, '/js/jquery-ui-1.8.16.custom.min.js')}" />
    <!-- Include JS files ends here -->

    <!-- Include CSS files begins here -->
    <apex:stylesheet value="{!URLFOR($Resource.JqueryUI, '/css/ui-lightness/jquery-ui-1.8.16.custom.css')}" />
    <!-- Include CSS files ends here -->
    <script type="text/javascript">
		var div = parent.document.getElementById('mydivb');
            autoOpen: false,
            height: 220,
            width: 800,
            modal: true




You won't be able to get at the standard page from the visualforce page, as the browser will block this as cross site scripting.  You'll have to display the dialog from the visualforce page.  This is why I mentioned you may have an issue if it isn't a traditional confirmation dialog.


That said, you should be able to put the visualforce page as a decent sized iframe in the main part of the home page.