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
apex_keenapex_keen 

From VF page, how to show pop up that uses controller data ?

Hello ! My requirement is something like this: Say I'm displaying 20 account records( based on some criteria) with check boxes in vf page(using wrapper class for this). Now whatever records users are selecting from those 20; I was to display them on nice pop up window. Now in my custom controller, I can have the logic to put the selected records in the 'List'. Next Step is to display the list data in popUP(javascript window?). how can I do that in best possible manner?
harsha__charsha__c

Hi 

You can do something like this

Store all those Ids of the selected records into a string in csv format.

Pass that string through url to pop up page

That pop up page also will be a vf page, which opens through javascript.

 

In the pop up page you can retrieve the string of ids and query and display those selected records in a nice way.

 

For opening the popup you can use this.

 

window.open('/apex/pageName?ids={!strIds},'Display Selected','width=400,height=200');

 

Hope this helps..!

harsha__charsha__c

if you are not looking up to do it through a vf page, there is a way to do it through jquery

 

For reference refer this

 

http://www.htmldrive.net/items/show/650/jQuery-Custom-PopUp-Window