You need to sign in to do that
Don't have an account?
How to Upload an image from documents to a VisualForce 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 >
<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 >
A sample Visual Force page along with the custom controller. For this example, I have stored an image in the Document object with name"sample pic". You can add this VF page to layout of the page.
Thanks