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
ashish jadhav 9ashish jadhav 9 

How can I display pageblock side by side in below code?

I've to display bullet marked code on same page? when I select the value by clicking on checkbox it will be displayed on the page in second pageblock section, so I used <apex:iframe> function and divided the page into 50/50 but how can I display selected record on another page?

<apex:page controller="Checkbox_Class" Tabstyle="Account">
<apex:form >
<apex:pageBlock Title="Accounts with CheckBoxes">
<apex:pageBlockSection Title="List of Available Accounts">
<apex:dataTable value="{!accounts}" var="a" columnswidth="50px,50px" cellpadding="4" border="1">
<apex:column >
<apex:facet name="header"> <apex:inputCheckbox >
<apex:actionSupport event="onclick" action="{!GetSelected}" onsubmit="checkAll(this)" rerender="Selected_PBS"/>
<apex:inputCheckbox value="{!a.selected}" id="checkedone">
<apex:actionSupport event="onclick" action="{!GetSelected}" rerender="Selected_PBS"/>
<apex:column headervalue="Account Name" value="{!a.acc.Name}" />
<apex:column headervalue="Account Number" value="{!a.acc.AccountNumber}" />
<apex:column headervalue="Phone" value="{!a.acc.Phone}" />
  • <apex:pageBlockSection Title="Selected Accounts" id="Selected_PBS">
  • <apex:dataTable value="{!SelectedAccounts}" var="s" columnswidth="50px,50px" cellpadding="4" border="1">
  • <apex:column headervalue="Account Name" value="{!s.Name}" />
  • <apex:column headervalue="Account Number" value="{!s.AccountNumber}" />
  • <apex:column headervalue="Phone" value="{!s.Phone}" />
  • </apex:dataTable>
  • </apex:pageBlockSection>
  • </apex:pageBlock>
  • </apex:form>
  • <script>
  • function checkAll(cb)
  • {
var inputElem = document.getElementsByTagName("input");
for(var i=0; i<inputElem.length; i++)
inputElem[i].checked = cb.checked;