• Ramesh Maamidi 6
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi all,

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!!
I created a QUick action which open the Visualforce page. On opening that dialog, I want to perform some operation and, close the dialog. But, I'm unable to close the dialog.  Here is my code:
<apex:page standardController="Order__c">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="/resource/jquery"></script>
  <script type="text/javascript">
    Sfdc.onReady(function() {
        alert();
        $('.uiModal').style.display = 'none';
    });
  </script>
  <p>Uncancelling...</p>
</apex:page>

If I execute $('.uiModal').style.display = 'none'; from browser console, it is closing dilog, but not from the visualforce page. Please help me.
I created a QUick action which open the Visualforce page. On opening that dialog, I want to perform some operation and, close the dialog. But, I'm unable to close the dialog.  Here is my code:
<apex:page standardController="Order__c">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="/resource/jquery"></script>
  <script type="text/javascript">
    Sfdc.onReady(function() {
        alert();
        $('.uiModal').style.display = 'none';
    });
  </script>
  <p>Uncancelling...</p>
</apex:page>

If I execute $('.uiModal').style.display = 'none'; from browser console, it is closing dilog, but not from the visualforce page. Please help me.
Hi all,

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!!