You need to sign in to do that
Don't have an account?
aks0011
how to get next element id./??
hi guys....
I am trying to add a feature in my page block table like a more column for choosing a list of salesorders. and for that I need a dropdown menu with multiselect functionality with checkboxes ....... here is code sample...
<apex:page controller="MultiSelectDropdownMenu">
<script>
function checkAll(cb){
var inputElem = document.getElementsByTagName("input");
for(var i=0; i<inputElem.length; i++){
if(inputElem[i].id.indexOf("checkedone")!=-1)
inputElem[i].checked = cb.checked;
}
}
function myFunction(id){
alert(col +'----'+ id);
document.getElementById(id).style.display= 'block';
}
function calcDedSecCCD(elm) {
var eid = elm.id;
document.getElementById(x).style.display= 'block';
}
function myFunction1(){
//alert('bye');
var x= document.getElementById('panel').style.display= 'none';
document.getElementById('flip').style.display= 'block';
document.getElementById('flip1').style.display= 'none';
}
</script>
<apex:form id="main">
<apex:pageBlock id="pb" >
<apex:pageBlockTable value="{!selectedSOrders1}" var="s" id="pbt">
<apex:column value="{!s.name}" />
<apex:column id="pbtc" headerValue="TAX" onclick="calcDedSecCCD(this)">
<div id="p" style="border:1px solid black;width:125px;height:auto;padding:5px;">
<div id="panel" style="width:125px;height:auto;padding:5px;display:none;">
<hr></hr>
<apex:dataTable id="pbdt" value="{!SalesOrders}" var="a" cellpadding="5">
<apex:column >
<apex:facet name="header"> <apex:inputCheckbox >
<apex:actionSupport event="onclick" action="{!GetSelected}" onsubmit="checkAll(this)" rerender="Selected_PBS"/>
</apex:inputCheckbox></apex:facet>
<apex:inputCheckbox value="{!a.selected}" id="checkedone">
<apex:actionSupport event="onclick" action="{!GetSelected}" rerender="Selected_PBS"/>
</apex:inputCheckbox>
</apex:column>
<apex:column headervalue="All" value="{!a.acc.Name}" />
</apex:dataTable>
</div>
</div>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
<br/><br/><br/>
<apex:pageBlock >
<apex:pageBlockSection Title="Selected Orders" id="Selected_PBS">
<apex:dataTable value="{!SelectedSOrders}" var="s" columnswidth="50px,50px" cellpadding="4" border="1">
<apex:column headervalue="Name" value="{!s.id}" />
</apex:dataTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
so this is not giving me the id of component from where I clicked the colum of row.
now you can see the hierarchy so if anyone have any solution than plz let me know...
I am trying to add a feature in my page block table like a more column for choosing a list of salesorders. and for that I need a dropdown menu with multiselect functionality with checkboxes ....... here is code sample...
<apex:page controller="MultiSelectDropdownMenu">
<script>
function checkAll(cb){
var inputElem = document.getElementsByTagName("input");
for(var i=0; i<inputElem.length; i++){
if(inputElem[i].id.indexOf("checkedone")!=-1)
inputElem[i].checked = cb.checked;
}
}
function myFunction(id){
alert(col +'----'+ id);
document.getElementById(id).style.display= 'block';
}
function calcDedSecCCD(elm) {
var eid = elm.id;
document.getElementById(x).style.display= 'block';
}
function myFunction1(){
//alert('bye');
var x= document.getElementById('panel').style.display= 'none';
document.getElementById('flip').style.display= 'block';
document.getElementById('flip1').style.display= 'none';
}
</script>
<apex:form id="main">
<apex:pageBlock id="pb" >
<apex:pageBlockTable value="{!selectedSOrders1}" var="s" id="pbt">
<apex:column value="{!s.name}" />
<apex:column id="pbtc" headerValue="TAX" onclick="calcDedSecCCD(this)">
<div id="p" style="border:1px solid black;width:125px;height:auto;padding:5px;">
<div id="panel" style="width:125px;height:auto;padding:5px;display:none;">
<hr></hr>
<apex:dataTable id="pbdt" value="{!SalesOrders}" var="a" cellpadding="5">
<apex:column >
<apex:facet name="header"> <apex:inputCheckbox >
<apex:actionSupport event="onclick" action="{!GetSelected}" onsubmit="checkAll(this)" rerender="Selected_PBS"/>
</apex:inputCheckbox></apex:facet>
<apex:inputCheckbox value="{!a.selected}" id="checkedone">
<apex:actionSupport event="onclick" action="{!GetSelected}" rerender="Selected_PBS"/>
</apex:inputCheckbox>
</apex:column>
<apex:column headervalue="All" value="{!a.acc.Name}" />
</apex:dataTable>
</div>
</div>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
<br/><br/><br/>
<apex:pageBlock >
<apex:pageBlockSection Title="Selected Orders" id="Selected_PBS">
<apex:dataTable value="{!SelectedSOrders}" var="s" columnswidth="50px,50px" cellpadding="4" border="1">
<apex:column headervalue="Name" value="{!s.id}" />
</apex:dataTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
so this is not giving me the id of component from where I clicked the colum of row.
now you can see the hierarchy so if anyone have any solution than plz let me know...
I will suggest you to implement the same code in a visualforce page because playing with the standard funtionality might be tricky. Create a new Visualforce page and assign to the related object and then customize it according and on the controller class include your code.
Hope this you will provide you a way to design it.
Thanks
Vikash_SFDC