• Kalyan Babu D
  • 0 Points
  • Member since 2017

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 2
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){
        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
          // Highlight the content
          // Execute the copy command
          // Remove the input from the body

    <apex:form > 
        <apex:pageBlock id="one"> 
           <apex:pageBlockSection >
                    <apex:commandButton value="Generate" reRender="one">                     
                    <apex:param name="RURL" value="{!$Page.Pagee}" assignTo="{!accid}"/> 
                <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"/> 
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")" ;


        <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"/>
            $(function() {
                $("#pv2").datepicker({changeMonth: true, changeYear: true});
                 $("#pv12").datepicker({changeMonth: true, changeYear: true});          
                $(".datepick").datepicker({changeMonth: true, changeYear: true, constrainInput: false});      

   <FONT Size="3"><i> Hello  {! $User.FirstName}</i></FONT>
    <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" >
        <CAPTION><B> <FONT Size="4">Salesforce Reports</FONT> </B></CAPTION>
        <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!




  • July 16, 2012
  • Like
  • 0