• sundarayya eda
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
On my visualforce page, i have a button, on click of this button i want to open another VFP as a pop up window.

Tried several ways without success. Any suggestions??? Thanks


<apex:commandButton value="Send" id="email" action="{!navigateToEmail}" onclick="OpenVfpage(myrecord.id);return false"/>

<script>
   
  function OpenVfpage(pid){
       var newwindow = window.open('/apex/MYVFP?id='+myrecord.id, 'open page','_blank','scrollbars=yes,toolbar=no,status=no);
       newwindow.focus();
    }
</script>


**********************COntroller _*****************
public PageReference navigateToEmail(){
    
        PageReference page = new Pagereference('/apex/MYVFP?Id='+myrecord.Id);
        page.setRedirect(true);
        return page;
        }




Hi Folks,

             My requirement is like this:

I need to show a visual source page as popup page on click of a custom button and the button is at opportunity related list level.Can any one tell me how to achive this and  with any code examples.

 

Thanks.