You need to sign in to do that
Don't have an account?
Ramesh Maamidi 6
Javascript not getting executed in Visualforce page
Hi all,
Here is my code:
Here the alert is not getting executed. If I remove contentType property it works fine. But, I need even that. All I need is to execute javascript after downloading a CSV file. Please help!!
Here is my code:
<apex:page standardController="Student__c" extensions="GenerateCSV" action="{!generate}" cache="true" contentType="text/csv#{!exportFileName}" language="en-US"> <script type='text/javascript' src='/canvas/sdk/js/publisher.js'></script> <script type="text/javascript"> Sfdc.onReady(function(){ alert('onReady'); }); </script> <apex:outputText value="{!exportStr}"/> </apex:page>
Here the alert is not getting executed. If I remove contentType property it works fine. But, I need even that. All I need is to execute javascript after downloading a CSV file. Please help!!
on load call genreteCSV() like this;
window.onload() {
genreteCSV();
}
function oncomplteHanle() {
Sfdc.onReady(function(){
alert('onReady');
});
}