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
hpmohanhpmohan 

open a visualforce page as a pop up (bootstrap modal) from custom (javascript) button.

Hello Experts,

I am trying to open up a visualforce page as a pop up upon clicking a custom button in 'Case' detail page. I am able to do so by the below codes.
var newWindow = window.open('../apex/CaseReassign', 'Popup Name' ,"width=600, height=550, scrollbars=yes,toolbar=no,status=no");
newWindow.focus();
AND..
 
openPopup('../apex/CaseReassign', "popup", 350, 480, "width=480,height=480,toolbar=no,status=no,directories=no,menubar=no,resizable=yes,scrollable=no", true)

Eventhough the page is popping up, the output does not look like a pop up. I would like to get the oputput look like as if it was implemented with Bootstrap Modal. (http://getbootstrap.com/javascript/#modals). ( OR, see the window popping up, upon clicking 'Add a code sample' [<>] above)..Again, it is possible to implement the same in VF pages with 'command button' click and is working in flying colors.

help me in achive the same result with standard page and custom button.

This issue have been chewing up a lot of my time and I coudn't find any help from internet too. Please let me know if the requirement is not clear.

Thanks in advance,
hpmohan
James LoghryJames Loghry
Hpmohan,

Make sure your Visualforce page is using the appropriate CSS and styling to make it look correct.  You can experiment with the styling by modifying the DOM of your popup with the "Inspect element" functionality in Chrome or other browsers.  This comes in handy for me when testing out styles quickly.

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_page.htm

Also, be sure you set useStandardStylesheets, showHeader, and sidebar to false in your apex:page element, to remove any standard styling that may interfere with your pop.

Keep in mind removing those items may have unintended consequences if you're using elements like apex:inputField or apex:outputField or other standard VF components.
hpmohanhpmohan
Hello James, 

Thank you for your reply.However, I was able to find what I was looking for here
https://gist.github.com/tstachl/2760221
and here
https://developer.salesforce.com/forums/?id=906F000000096jvIAA

Sorry, if my question was misleading or vague.
PS: Component I was looking for is 'dialogs' .

Thanks for your help.
hpmohan