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
saimadhusaimadhu 

How to display checkbox values in modal popup window

Hi, Iam trying to place some checkboxes and trying to read those values in modal popup window, but my page is not recognising the actions.

Here is my code

<apex:outputPanel id="priModalPanelWrap" rendered="{!ap.pg.name == 'PRI Services'}">
<a href="#" id="modalButton{!p.b.Id}" class="actionLink">Select</a>

<apex:outputPanel rendered="{!ap.pg.name == 'PRI Services'}" >
<div id="theModal{!p.b.Id}" class="reveal-modal medium" style="width:320px;" >


<div style="line-height:18px; margin:0 0 20px; padding:0; border:0; font-weight:bold; font-size:13px; font-style:normal; text-align:left; display:block;">
<label style="font-size:14px;">Will this PRI be:</label>
<br />
<table border="1">
<tr border="1" class="dataRow even first" onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" onmouseout="if (window.hiOff){hiOff(this);}" onmouseover="if (window.hiOn){hiOn(this);}">
<td> </td>
<td> Higher Capacity Circuit </td>
<td class="actionColumn"><apex:inputCheckbox value="{!prihighcapacity}" id="checkyes">YES
<apex:actionSupport event="onclick" action="{!highcapacity}" rerender="PRIcapacity">
<!-- <apex:param name="selectedproductid" value="{!ap.pg.id}" assignTo="{!selectedproductid}" />-->
</apex:actionSupport>
</apex:inputCheckbox>

</td>
<td class="actionColumn"><apex:inputCheckbox value="{!prinohighcapacity}" id="checkno">NO
<apex:actionSupport event="onclick" action="{!nohighcapacity}" rerender="PRIcapacity">
<!--<apex:param name="selectedSiteABuildSiteId" value="{!epl.bs.Id}" assignTo="{!selectedSiteABuildSiteId}" />-->
</apex:actionSupport>
</apex:inputCheckbox>
</td>
</tr>
<tr>

</tr>
</table>

</div>

<a class="close-reveal-modal">&#215;</a>
<apex:commandButton value="Submit" action="{!prioptions}"/>

</div>
</apex:outputPanel>

<script type="text/javascript">
jQuery(document).ready(function(jQuery) {
jQuery('#modalButton{!p.b.Id}').click(function(e) {
e.preventDefault();
jQuery('#theModal{!p.b.Id}').reveal();
});
});
</script>


</apex:outputPanel>

 

in the controller:

 

public string selectedproductid {get;set;}
public boolean prihighcapacity {get;set;}
public boolean prinohighcapacity {get;set;}

public void highcapacity() {


system.debug('we are in highcapacity module');
if(prihighcapacity == true){
prinohighcapacity = false;
}
system.debug('value in highcapacity is'+prihighcapacity);
system.debug('value in highcapacity is'+prinohighcapacity);
}

public void nohighcapacity(){

system.debug('we are in non-high capacity module');
if(prinohighcapacity == true){
prihighcapacity = false;
}
system.debug('value in highcapacity is'+prihighcapacity);
system.debug('value in highcapacity is'+prinohighcapacity);
}


public void prioptions() {

system.debug('in pri options method');

}

 

 

when i execute my page , when i click yes or no, it is not executing the actions and not displaying system.debug messages.

is it not possible to place checkboxses in modal window?

asish1989asish1989

Hi

    Try by adding immidaite =true 

        

      <td class="actionColumn"><apex:inputCheckbox value="{!prihighcapacity}" id="checkyes"   immediate="true">YES

 

 

 

Did this post resolve your issue,If so please mark it solved so that others get benifited

 

 

Thanks

asish

S91084S91084

Instead of using the merge fields for the id of "div" and <a> tag, use title to display the merge fields and give it a try.

try if your modal dialog is displaying or not. we can procedd from there.

 

Let me know if you have any concerns.

saimadhusaimadhu

Thanks for the reply.Iam new to this salesforce and i didnt get what is the merge field.could you say it clearly please.

 

S91084S91084

I was taking abt {!p.b.Id} you have used in the id.

saimadhusaimadhu

Hi, I tried with title in div and a tag. the modal popup is opening but the actions associate with that checkboxes are not executing.i checked those actions by placing system.debug().