You need to sign in to do that
Don't have an account?

Call a JavaScript function from VF page to the Home page custom component
Hi all,
How to call a JavaScript function from a Visualforce page that is embedded in the page layout as a section to the home page custom component?
The JavaScript executes when the VF page is not embedded in the pagelayout but the same will not work when we add the VF page to the page layout.
VF page --> this page is embedded in the Opportunity page layout.
<apex:page standardController="opportunity">
<script>
displayMessage();
</script>
</apex:page>
Custom Component (This code is available in the sidebar)
<script>
function displayMessage()
{
alert("hello");
}
</script>
Any help would be greatly appreciated.
Regards,
Raghu
How to call a JavaScript function from a Visualforce page that is embedded in the page layout as a section to the home page custom component?
The JavaScript executes when the VF page is not embedded in the pagelayout but the same will not work when we add the VF page to the page layout.
VF page --> this page is embedded in the Opportunity page layout.
<apex:page standardController="opportunity">
<script>
displayMessage();
</script>
</apex:page>
Custom Component (This code is available in the sidebar)
<script>
function displayMessage()
{
alert("hello");
}
</script>
Any help would be greatly appreciated.
Regards,
Raghu
Another approach would be to use a custom javascript button or link and embed your function call in a REQUIRESCRIPT function in that instead. Here's a blog post that should get you started. http://blog.scottmcclung.com/2014/01/hack-together-jquery-modal-popup-in.html