• Kalyan Babu D
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi everyone,
I am new to salesforce,actually i had param field with value as some URL.Now i need to copy that url on  ClipBoard by using a button Copy.Can any one please help me out.Thanks in advance.
This is my vf page.


<apex:page controller="one"> 

<apex:messages />
<script language="JavaScript">
        function ClipBoard(copytextid){
            copyToClipboard(copytextid);
        }
        function copyToClipboard(elementId) {
          // Create an auxiliary hidden input
          var aux = document.createElement("input");
          // Get the text from the element passed into the input
          aux.setAttribute("value", document.getElementById(elementId).innerHTML);
          // Append the aux input to the body
          document.body.appendChild(aux);
          // Highlight the content
          aux.select();
          // Execute the copy command
          document.execCommand("copy");
          // Remove the input from the body
          document.body.removeChild(aux);
        }    
    </script>   

    <apex:form > 
        <apex:pageBlock id="one"> 
           <apex:pageBlockSection >
                    <apex:commandButton value="Generate" reRender="one">                     
                    <apex:param name="RURL" value="{!$Page.Pagee}" assignTo="{!accid}"/> 
                    </apex:commandButton>
               </apex:pageBlockSection>
                <apex:pageBlockSection >                
                Your Referral Link<apex:inputText id="copyText" value="{!accid}"/>                
                <apex:pageBlockSectionItem >
                <apex:commandbutton onClick="ClipBoard('{!$Component.copytext}');" rerender="one" value="Copy to Clipboard"/> 
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection> 
            </apex:pageBlock> 
    </apex:form> 
</apex:page>
 
I've saveed my company logo in the Documents object of Salesforce. I want to insert this as the very first thing inside my VisualForce page on the Top Left and the have the line "Hello ...." appear (per the  coding below. I don't know how to insert an image. Do I needto reference the entire URL that the image is under within the Documents object? I know relative URLs would be better.  A_K_Logo_png is the name of my image /01523000000I3N9 is the relative URL  that it's found under.  How can I best accomlish this? Can someone  please repost my code for it to show up accordingly? I don't know how the syntax is to do this. I did not insert the entire code following hte beginning of a table that I posted but this is probably enough.

<apex:Page >
<apex:image url="{/01523000000I3N9}"></apex:image>
{apex:image:url"("A_K_Logo_png")" ;
}

   <head>

        <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"/>
        <script src="//code.jquery.com/jquery-1.10.2.js"></script>
        <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
        <link rel="stylesheet" href="/resources/demos/style.css"/>
        <script>
            $(function() {
                $("#pv2").datepicker({changeMonth: true, changeYear: true});
                 $("#pv12").datepicker({changeMonth: true, changeYear: true});          
                $(".datepick").datepicker({changeMonth: true, changeYear: true, constrainInput: false});      
              });             
        </script>       
    </head>
<br/>

   <FONT Size="3"><i> Hello  {! $User.FirstName}</i></FONT>
    <br/>
    <br/>
    <FONT Size="3"> <i>Please use the fields below to enter your desired dates for the specified reports.</i></FONT>
    <TABLE Border= "3" CELLSPACING="1" CELLPADDING="1" >
        <br/>
        <CAPTION><B> <FONT Size="4">Salesforce Reports</FONT> </B></CAPTION>
        <br/>
        <TR style="text-align:center;font-size:12pt;background-color:#ADD8E6;">
            
            <TD  >

 

Using facebook toolkit, I can successfully post any thing on my own wall in facebook from my salesforce account.

But is it possible to post something onto a page or some other's account? 

How can this integration be done?

 

Pls help!

 

Regards,

Asit

  • July 16, 2012
  • Like
  • 0