You need to sign in to do that
Don't have an account?
Feng_W
javascript in enhancedist oncomplete attribute is not firing????
i had a very simple tab page within a tab panel like this
<apex:panelGrid id="pnlGrid" width="100%">
<apex:enhancedList type="Case" height="700" rowsPerPage="100" oncomplete="alert('abc');" />
</apex:panelGrid>
however the javascript oncomplete="alert('abc');" is not firing when the enhancedList completes rendering...
anyone has an idea?
thanks in advance
I just hit this same issue today. It does not execute on initial load. Only when the view is changed. Seems like a bug.
I am not sure it is a bug or not, if you change the filter in the enhancedlist , the oncomplete event will fire, but it will not fire when first time load the enhancedlist :(
I came up with this work around.
<apex:page standardController="Opportunity" recordSetvar="opportunities" id="page" >
<apex:enhancedList type="Opportunity" height="735" rowsPerPage="25" id="enhancedList"/>
<script type="text/javascript">
isListLoaded();
function isListLoaded(){
var list = document.getElementsById("page:enhancedList_wrapper");
if(list.length == 0){
//Enhanced list hasn't loaded yet, check again shortly.
setTimeout("isListLoaded()",200);
}else{
//alert('List has loaded');
}
}
</script>
</apex:page>