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
Amit Yadav 9Amit Yadav 9 

set dynamic marging from top for a popup

<script type="text/javascript">
   function popuponclick(id)
   {
      my_window = window.open('{!$Page.popuppage}?id='+id, 'popuppage','height=340,width=350,left=315,top=180,toolbar=0, directories=0, status=0,location=no',
       "mywindow","status=1,width=350,height=150");
   }
</script>


i m using this script to call a pop up on my vf page. but the top-margin of the pop up is fixed so as soon as i move my mouse away from the link, pop up closes but i need to click a button on the pop up, is there any way i can set the margin dynamic according to the top-margin of the record itself.

Thank you
Deepak GulianDeepak Gulian
function popuponclick(id) {
        window.open('{!$Page.AaccTest}?id='+id,'','height=340,width=350,left=315,top=180,toolbar=0, directories=0, status=no,location=no');
    }
Try this.