i'm working with DomPdf in Laravel. But it not showing all the data.
here's the image (I can't embeded the image because don't have enough reputation) :
IMG1
and this my pdf blade :
body{
background-color: white;
}
.h2pdf{
text-align: center;
}
.h5pdf{
margin-top: -15px;
text-align: center;
}
.devider{
width:100%;
height:10px;
background-color:yellow;
margin-bottom:20px;
margin-top:-10px;
}
.tr-head{
text-align: left;
text-decoration: underline;
text: bold;
font-size: 10px;
height: 1px;
}
.title{
background: #dddddd;
}
.tblpdf{
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
border: 1px solid black;
}
td{
border-left: 1px solid black;
}
.row-fill{
border-bottom: 1px solid black;
}
.page-break {
page-break-after: auto;
}
<body>
<h2 class="h2pdf">Technical Service Report</h2>
<h5 class="h5pdf">Address</h5>
<div class="devider"></div>
<h5 class="h5pdf">TSR No. : {{$head->no_tsr}}</h5>
<table class="tblpdf">
<tr class="title">
<td colspan="3">Customer & Mechanic Detail</td>
</tr>
<tr class="tr-head">
<td>Report By</td>
<td>Mechanic Arrival Date & Time</td>
<td>Technician</td>
</tr>
<tr class="row-fill">
<td>{{$head->report_creator}}</td>
<td>{{date('d-M-Y H:i',strtotime($head->mechanic_arrival_date))}}</td>
<td>{{$head->mechanic_name}}</td>
</tr>
<tr class="tr-head">
<td>Customer</td>
<td>PIC</td>
<td>Site/Province</td>
</tr>
<tr class="row-fill">
<td>{{$head->customer_name}}</td>
<td>{{$head->customer_pic}}</td>
<td>{{$head->customer_site}}</td>
</tr>
<tr class="title">
<td colspan="3">Unit & Failure Detail</td>
</tr>
<tr class="tr-head">
<td>Brand</td>
<td>Model</td>
<td>Category</td>
</tr>
<tr class="row-fill">
<td>{{$head->unit_brand}}</td>
<td>{{$head->unit_model}}</td>
<td>{{$head->unit_category}}</td>
</tr>
<tr class="tr-head">
<td>Serial Number</td>
<td>Hourmeter</td>
<td>Kilometer</td>
</tr>
<tr class="row-fill">
<td>{{$head->unit_sn}}</td>
<td>{{$head->unit_hm}}</td>
<td>{{$head->unit_km}}</td>
</tr>
<tr class="tr-head">
<td>Chasis SN</td>
<td>Engine SN</td>
<td>Machine Application</td>
</tr>
<tr class="row-fill">
<td>{{$head->unit_chasis_sn}}</td>
<td>{{$head->unit_engine_sn}}</td>
<td>{{$head->unit_application}}</td>
</tr>
<tr class="tr-head">
<td>Commisioning Date</td>
<td></td>
<td></td>
</tr>
<tr class="row-fill">
<td>
#if($head->unit_commissioning_date!=NULL)
{{date('d-m-Y',strtotime($head->unit_commissioning_date))}}
#elseif($head->unit_commissioning_date == NULL)
UNKNOWN
#endif
</td>
<td></td>
<td></td>
</tr>
<tr class="tr-head">
<td>Faulty Type</td>
<td>Date & Time of Servicing</td>
<td>Date & Time Completion</td>
</tr>
<tr class="row-fill">
<td>{{$head->faulty_type}}</td>
<td>{{date('d-M-Y H:i',strtotime($head->job_beginning_date))}}</td>
<td>
#if(date('Y-m-d',strtotime($head->job_complete_date))!= '1970-01-01')
{{date('d-m-Y H:i',strtotime($head->job_complete_date))}}
#elseif(date('Y-m-d',strtotime($head->job_complete_date)) == '1970-01-01')
UNFINISHED JOB
#endif
</td>
</tr>
<tr class="tr-head">
<td>Faulty Group</td>
<td>Job Type</td>
<td>Job Status</td>
</tr>
<tr class="row-fill">
<td>{{$head->faulty_group}}</td>
<td>{{$head->job_type}}</td>
<td>{{$head->job_status}}</td>
</tr>
<tr class="tr-head">
<td colspan="3" style="border-top:1px solid black;">Condition</td>
</tr>
<tr class="row-fill">
<td colspan="3">{{$head->unit_condition}}</td>
</tr>
<tr class="title" style="margin-top:5px;">
<td colspan="3">Failure (Complaints)</td>
</tr>
<tr>
<td colspan="3">{!!$head->job_complaint!!}</td>
</tr>
<tr class="title">
<td colspan="3">Failure (Analysis)</td>
</tr>
<tr>
<td colspan="3">{!!$head->job_analysis!!}</td>
</tr>
<tr class="title">
<td colspan="3">Failure (Correction)</td>
</tr>
<tr>
<td colspan="3">{!!$head->job_correction!!}</td>
</tr>
<tr class="title">
<td colspan="3">Failure (Parts)</td>
</tr>
<tr>
<td colspan="3">{!!$head->job_failure_parts!!}</td>
</tr>
</table>
<div class="page-break"></div>
<a>Photo(s)</a>
<table style="text-align:center;border: solid 1px;border-collapse: collapse;">
<tr class="row-fill">
<td colspan="2">
<img src="{{public_path().'/images/TSR/'.$head->url_photo_unit}}" width="350px" height="300px" alt="Unit"><br>Unit
</td>
</tr>
<tr>
<td>
<img src="{{public_path().'/images/TSR/'.$head->url_photo_sn}}" width="350px" height="300px" alt="SN"><br>Serial Number
</td>
<td>
<img src="{{public_path().'/images/TSR/'.$head->url_photo_hm}}" width="350px" height="300px" alt="Hm"><br>Hourmeter
</td>
</tr>
</table>
<div class="page-break"></div>
<table style="border: solid 0.5px;width:100%;text-align: center" >
<tr><td></td></tr>
<?php
$rcount = 0;
foreach($detail as $record){
if ($rcount % 2 == 0){
echo '<tr>';
}
?>
<td>
<img src="{{public_path().'/images/TSR/'.$record->url_photo}}" width="350px" height="300px" alt="image">
<label for="description">{{$record->description}}</label>
</td>
<?php if ($rcount % 2 == 2){
echo '</tr>';
}
$rcount++;
}
//here is a check condition in case you don't have more times multiple of 3 rows
if ($rcount % 2 != 0){
echo '</tr>';
}
?>
</table>
</body>
I already tried the page-break css with :
page-break-before : always
page-break-before : auto
page-break-after : always
page-break-after : auto
But nothing changed. I don't know what the problem is. Please help me, thanks in advance.
I found a way to solve this issue. The data shown completely when we use div instead of table. We just need to add some css on the div so the data will show like we're using table.
Hopefully other people can solve the problem with this method.
I have a button that will show data based on specific ID:
<td style="text-align: center; vertical-align:middle;">
Stripe Payment
</td>
The route is:
Route::get('payment/{id}', 'BookingController#payment')->middleware('verified');
The BookingController#payment is:
public function payment($id)
{
$bookings= \App\Booking::find($id);
return view('parking.payment')->with('bookings',$bookings);
}
and the blade view is:
<table class="table">
<thead>
<tr>
<th style="text-align: center; vertical-align:middle;">Booking ID</th>
<th style="text-align: center; vertical-align:middle;">Application Status</th>
<th style="text-align: center; vertical-align:middle;">Semester</th>
<th style="text-align: center; vertical-align:middle;">Parking Area</th>
<th style="text-align: center; vertical-align:middle;">Parking Lot No.</th>
<th style="text-align: center; vertical-align:middle;">Payment</th>
</tr>
</thead>
#foreach($bookings as $book)
<tr>
<td style="text-align: center; vertical-align:middle; color:red;">{{$book['booking_id']}}</td>
<td style="text-align: center; vertical-align:middle;">{{$book['apply_status']}}</td>
<td style="text-align: center; vertical-align:middle;">{{$book['semester']}}</td>
<td style="text-align: center; vertical-align:middle;">{{$book['park_area']}}</td>
<td style="text-align: center; vertical-align:middle;">{{$book['park_no']}}</td>
<td style="text-align: center; vertical-align:middle;">{{$book['price']}}</td>
</tr>
</table>
#endforeach
But, the blade view only shows blank table. Is it because the data conflicts with the Stripe payment form that i make in the same page?
$bookings = \App\Booking::find($id); will return a single Booking, but based on your naming and the loop in the blade view it seems that you were expecting a collection. Perhaps you wanted \App\Booking::where('booking_id', $id)->get()? (I'm not totally clear on your database structure)
Facing problems with Thymeleaf Template Engine.
I need to add some dynamic content to the html page.
I've a map like this
Map<String, String> info = new HashedMap<String, String>();
info.put("user_name", "username");
info.put("host_user_name", "host_user_name");
info.put("title", "Element_title");
info.put("url", "https://www.google.com");
info.put("conv_url","/#/home/" + "23243242" + "/services?fid=543545"&fview=conversation")
and I am adding the info in the map to the context
MimeMessage message = sender.createMimeMessage();
MimeMessageHelper helper = new MimeMessageHelper(message, true);
Context context = new Context();
System.out.println("---------0------------");
info.forEach((key, value) -> {
context.setVariable(key, value);
});
String template = templateEngine.process("my-html", context);
my-html is like this
<table width="115" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td align="right" valign="top" class="mob_center" style="padding:15px">
<a target="_blank" style="color: #596167; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">
<font face="Arial, Helvetica, sans-seri; font-size: 13px;" size="3" color="#596167">
<img src="${url}/static/images/logo.png" width="150" height="auto" alt="Logo" border="0" style="display: block;" /></font></a>
</td>
</tr>
</table>
<table style="width:100%">
<tr>
<td style="font-size: 12px; padding-top:5px; color: #000; line-height: 16px; text-align: left;" th:inline="text">
<span style="font-weight:600; display:block; " th:title="
${host_user_name}">[[${host_user_name}]] </span>[[${title}]]
</td>
</tr>
<tr>
<td width="40" valign="top"> </td>
<td>
<table style="width:100%">
<tr>
<td style="font-size: 13px; color: #fff; line-height: 16px; text-align: left;" th:inline="text">
<a title="" style="color:#000; text-decoration:none; font-weight:500; font-size:12px;">[[${followers}]] followers</a> | <a title="" style="color:#000; text-decoration:none; font-weight:500; font-size:12px;" th:inline="text">[[${replies}]] replies</a>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<img src="${url}/static/images/Join.png" title="" alt="Join the Conversation" />
</td>
</tr>
</table>
inline text is modifying for me, but how to change href and src attribute values.
<td colspan="2" style="text-align:center">
<img src="${url}/static/images/Join.png" title="" alt="Join the Conversation" />
</td>
This should be replaced by
<td colspan="2" style="text-align:center">
<img src="https://www.googl.com/static/images/Join.png" title="" alt="Join the Conversation" />
</td>
Can anyone help me on this?
Please, read this documentation.
Particularly, look at this example in this documentation :
<a th:href="#{/order/details(id=${order.id},action=(${user.admin} ? 'show_all' : 'show_public'))}">
You have to use th:href
This is Working for me
<tr>
<td colspan="2" style="text-align:center">
<a th:href="#{${url}+${conv_url}}"><img th:src="#{${diva_url+'/static/images/Join.png'}}" title="" alt="Join the Converstaion" /></a> &
</tr>
I am getting an error but there is no caption on it. There is a cfloop looping over the result set which comes from a Stored Procedure. Each row makes an AJAX request to another page and fetch some information. In that AJAX called page, CF prints an error. For example, there are 100 rows come from Stored Procedure. While looping through that data set, 2nd and 50th rows throw error but other 98 rows doesnt. Next time 4th, 7th and 15th rows throw error, other 97 doesnt. The message is shown in below.
I have checked my code there is no problem. Moreover there is no stability.
<title>Error Occurred While Processing Request</title>
<font style="COLOR: black; FONT: 16pt/18pt verdana">
The web site you are accessing has experienced an unexpected error.<br>
Please contact the website administrator.
</font>
<br><br>
<table border="1" cellpadding="3" bordercolor="#000808" bgcolor="#e7e7e7">
<tbody><tr>
<td bgcolor="#000066">
<font style="COLOR: white; FONT: 11pt/13pt verdana" color="white">
The following information is meant for the website developer for debugging purposes.
</font>
</td>
</tr><tr>
</tr><tr>
<td bgcolor="#4646EE">
<font style="COLOR: white; FONT: 11pt/13pt verdana" color="white">
Error Occurred While Processing Request
</font>
</td>
</tr>
<tr>
<td>
<font style="COLOR: black; FONT: 8pt/11pt verdana">
<table width="500" cellpadding="0" cellspacing="0" border="0">
<tbody><tr>
<td id="tableProps2" align="left" valign="middle" width="500">
<h1 id="textSection1" style="COLOR: black; FONT: 13pt/15pt verdana">
</h1>
</td>
</tr>
<tr>
<td id="tablePropsWidth" width="400" colspan="2">
<font style="COLOR: black; FONT: 8pt/11pt verdana">
</font>
</td>
</tr>
<tr>
<td height=""> </td>
</tr>
<tr>
<td colspan="2">
<font style="COLOR: black; FONT: 8pt/11pt verdana">
Resources:
<ul>
<li>Check the ColdFusion documentation to verify that you are using the correct syntax.</li>
<li>Search the Knowledge Base to find a solution to your problem.</li>
</ul>
<p>
</p></font></td>
</tr>
<tr>
<td colspan="2">
<table border="0" cellpadding="0" cellspacing="0">
<tbody><tr>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">Browser </font></td>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36</font></td>
</tr>
<tr>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">Remote Address </font></td>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">my_ip</font></td>
</tr>
<tr>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">Referrer </font></td>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">http://my_host_ip/path/file.cfm?CFID=1234&CFTOKEN=es785e1ff5b98f53-E3FC4F25-0917-2A90-2CA672635042EEDE</font></td>
</tr>
<tr>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">Date/Time </font></td>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">31-Jan-17 08:13 AM</font></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<table width="500" cellpadding="0" cellspacing="0">
<tbody><tr>
<td valign="top">
<font style="FONT: 8pt/11pt verdana;">
Stack Trace
</font></td>
</tr>
<tr>
<td id="cf_stacktrace">
<font style="COLOR: black; FONT: 8pt/11pt verdana">
<br>
<br>
<pre>java.util.ConcurrentModificationException
at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:762)
at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:801)
at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:799)
at java.util.HashMap.putAll(HashMap.java:523)
at coldfusion.monitor.memory.MemoryTracker.__AW_getAllPrimitiveMap(MemoryTracker.java:92)
at coldfusion.monitor.memory.MemoryTracker.getAllPrimitiveMap(MemoryTracker.java)
at coldfusion.monitor.memory.MemoryTracker.getEstimatedMemory(MemoryTracker.java:117)
at coldfusion.monitor.memory.SessionMemoryMonitor$TopMemoryUsedSessions.compareThreshold(SessionMemoryMonitor.java:166)
at coldfusion.monitor.util.MonitorList.add(MonitorList.java:102)
at coldfusion.monitor.memory.SessionMemoryMonitor.record(SessionMemoryMonitor.java:49)
at coldfusion.monitor.memory.SessionMemoryMonitor.record(SessionMemoryMonitor.java:37)
at coldfusion.monitor.memory.MemoryMonitor.record(MemoryMonitor.java:261)
at coldfusion.monitor.memory.MemoryRequestEventHandler.onRequestComplete(MemoryRequestEventHandler.java:23)
at coldfusion.monitor.event.RequestMonitorEventProcessor.onRequestComplete(RequestMonitorEventProcessor.java:247)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:46)
at coldfusion.filter.PathFilter.__AW_invoke(PathFilter.java:87)
at coldfusion.filter.PathFilter.invoke(PathFilter.java)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
at coldfusion.CfmServlet.__AW_service(CfmServlet.java:200)
at coldfusion.CfmServlet.service(CfmServlet.java)
at coldfusion.bootstrap.BootstrapServlet.__AW_service(BootstrapServlet.java:89)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.__AW_service(FilterChain.java:101)
at jrun.servlet.FilterChain.service(FilterChain.java)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.__AW_invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
</pre></font></td>
</tr>
</tbody></table>
</font>
</td>
</tr>
</tbody></table>
I have installed CF 9.0.2 and problem solved.
Hi I am trying to implement a data table in Visualforce page. I have included the jquery.js, DataTable.Min.Js, Datatable.js in the page in this order. I have initialize the data table like below
$(document).ready( function () {
var oTable1 = $('#LeadTable').dataTable( {
"sPaginationType": "full_numbers",
"aoColumnDefs": [ { "bVisible": false, "aTargets": [ ] }],
"bLengthChange": false,
"bAutoWidth": false,
"iDisplayLength" : 20,
"aaSorting": [[ 4, "desc" ]],
"oColumnFilterWidgets": { "aiExclude": [ 0, 3, 4 ] }
});
});
I am getting the error "Object doesn't support property or method 'dataTable'". I check what is the issue?
Thanks.
VF page
<apex:page controller="HomeBasedClass" id="thePage" >
<apex:stylesheet value="{!$Resource.RoleHierarchyPopupStyle}"/>
<style type="text/css">
body{
background-color: #f5f5f5;
}
#Initialloading{
width: 100%;
height: 500px;
top: 200px;
/*left: 200px;*/
/*position: fixed;*/
display: block;
z-index: 99
}
#loading-image{
position: absolute;
top: 40%;
left: 45%;
z-index: 100
}
</style>
<script type="text/javascript">
var i = setInterval(function () {
clearInterval(i);
// The desired code is only this:
document.getElementById("Initialloading").style.display = "none";
document.getElementById("thePage:formId").style.display = "";
}, 5000);
</script>
<script type="text/javascript">
function showPopUp(divId)
{
document.getElementById(divId).style.display = '';
}
function ClosePopup(divId){
document.getElementById(divId).style.display = 'none';
}
</script>
<style>
#LeadTable { border-collapse: collapse; }
h3 { color: #333333;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
line-height: 20px;
}
#panel table { border-collapse: collapse; }
</style>
<style>
.button { background: url('{!$Resource.LoadingButton}') no-repeat left top; width:335px; height:65px;}
.circle {
width:22px;
height:22px;
float:left;
margin-bottom:18px;
margin-top:18px;
margin-left: 55px;
}
.txt {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:13px;
color:#000000;
line-height:20px;
margin-left:15px;
margin-bottom:18px;
margin-top:18px;
width: 200px;
font-weight: bold;
float: left;
}
#TaskTable_paginate {
height:35px;
}
</style>
<div id="Initialloading" align="center">
<img src="{!$Resource.Loading}" />
<br/><br/>
<font color="Red">Please Wait...</font>
</div>
<apex:form id="formId" style="display:none;">
<!--<script src="/soap/ajax/15.0/connection.js" type="text/javascript"></script>
<script src="/soap/ajax/15.0/apex.js" type="text/javascript"></script>-->
<!--<apex:includeScript value="{!$Resource.jQueryLib19Compress}"/>
<script src="{!URLFOR($Resource.DataTables, 'media/js/jquery.dataTables.min.js')}"></script>
<script src="{!URLFOR($Resource.DataTables, 'media/js/jquery.dataTables.js')}"></script>
<script src="{!URLFOR($Resource.DataTables, 'media/js/ColVis.js')}"></script>
<script src="{!URLFOR($Resource.DataTables, 'media/js/ZeroClipboard.js')}"></script>
<script src="{!URLFOR($Resource.DataTables, 'media/js/TableTools.js')}"></script>
<script src="{!URLFOR($Resource.DataTables, 'media/js/ColumnFilterWidgets.js')}"></script>-->
<apex:includeScript value="{!$Resource.DtJQueryJs}"/>
<apex:includeScript value="{!$Resource.DtDataTableMinJs}"/>
<apex:includeScript value="{!$Resource.DtDataTableJs}"/>
<apex:stylesheet value="{!URLFOR($Resource.DataTables, 'media/css/DataTablesAdvancedExample.css')}"/>
<script type="text/javascript">
$(document).ready( function () {
var oTable1 = $('#LeadTable').dataTable( {
"sPaginationType": "full_numbers",
"aoColumnDefs": [ { "bVisible": false, "aTargets": [ ] }],
"bLengthChange": false,
"bAutoWidth": false,
"iDisplayLength" : 20,
"aaSorting": [[ 4, "desc" ]],
"oColumnFilterWidgets": { "aiExclude": [ 0, 3, 4 ] }
});
var oTable2 = $('#JobprofileTable').dataTable( {
"sPaginationType": "full_numbers",
"iDisplayLength" : 5,
"bLengthChange": false,
"aoColumnDefs": [ { "bVisible": false, "aTargets": [ ] }],
"aaSorting": [[ 5, "desc" ]],
"oColumnFilterWidgets": { "aiExclude": [ 0, 3, 4 ]}
});
});
function startSplash() {
document.getElementById('splashDiv').style.display='';
}
function endSplash() {
document.getElementById('splashDiv').style.display='none';
}
</script>
<div class="button" id="splashDiv" style="display: none; position: fixed; left: 500px; top: 250px; border: 0px; z-index: 9999;">
<div class="circle"><apex:image value="{!$Resource.LoadingImage}"></apex:image></div>
<div class="txt">Please Wait. Loading...</div>
</div>
<apex:actionStatus id="splashStatus" onstart="startSplash();" onstop="endSplash();" />
<apex:actionFunction name="ajaxSetClientLoaded" action="{!setClientLoaded}" immediate="true" rerender="formId"/>
<apex:sectionHeader subtitle="Home Base - Sales Rep Dashboard"/>
Leads |<apex:outputLabel > </apex:outputLabel><apex:outputLabel >Job Profiles</apex:outputLabel><apex:outputLabel > |</apex:outputLabel> Opportunities | Activities | Orders & Deliveries<br/><br/><br/>
<label style="cursor:pointer; text-decoration:underline" onclick="showPopUp('descreteAddDiv');">{!$UserRole.Name}</label><br/><br/>
<div id="descreteAddDiv" style="display:none;">
<apex:outputPanel styleClass="DescAddresspopupBackground" layout="block" />
<apex:outputPanel id="fulfillingBranchPanel" style="-moz-border-radius: 15px;-webkit-border-radius: 15px;border-radius: 10px;" styleClass="custDescAddressPopup" layout="block" >
<div style="width:25px; float:right;padding:5px 5px; cursor:pointer;" onclick="ClosePopup('descreteAddDiv');">[X]</div>
<apex:iframe src="/apex/testpage" width="100%" height="350px" scrolling="true"/>
</apex:outputPanel>
</div>
<!-- ----------------------------------------------------Lead section Start------------------------------------------ -->
<apex:pageBlock id="leadSection" >
<table width="100%" border="1" cellpadding="5" cellspacing="8">
<tr>
<td align="left" colspan="2"><h3>Leads</h3></td>
</tr>
<tr>
<td width="25%" valign="top" height="265px;">
<apex:outputPanel id="componentPnl">
<c:LeadGraphComponent userId="{!SelectedUserId}" id="LeadComponent"/>
</apex:outputPanel>
</td>
<td width="75%" valign="top">
<table cellpadding="0" cellspacing="0" border="0" class="display" id="LeadTable" >
<thead>
<tr>
<th style="font-weight: bold; text-align: center; font-family: Arial; font-size: 8pt;">Company</th>
<th>Name</th>
<th>Phone</th>
<th>Servicing Branch ID</th>
<th>Created Date</th>
<th>Last Activity Date</th>
<th>Next Activity Date</th>
</tr>
</thead>
<tbody>
<apex:repeat value="{!LstLeadGrid}" var="c">
<tr>
<td>{!c.Company}</td>
<td>{!c.Name}</td>
<td>{!c.Phone}</td>
<td>{!c.Servicing_Branch_Id__c}</td>
<td>
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
<apex:param value="{!c.Created_Date_Time__c}"/>
</apex:outputText>
</td>
<td>
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
<apex:param value="{!c.Last_Activity_Datetime__c }" />
</apex:outputText>
</td>
<td>
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
<apex:param value="{!c.Next_Activity_Date__c}" />
</apex:outputText>
</td>
</tr>
</apex:repeat>
</tbody>
</table>
</td>
</tr>
</table>
</apex:pageBlock>
<!-- ----------------------------------------------------Lead section End------------------------------------------ -->
<!-- ----------------------------------------------------Job Profile section Start------------------------------------>
<!-- ------rendered="{!IF(($UserRole.Name == 'Branch Manager - US') || ($UserRole.Name == 'Customer Sales Specialist - NSC - US') || ($UserRole.Name == 'Regional Manager - US') || ($UserRole.Name == 'Sales Rep - US') || ($UserRole.Name == 'Territory Sales Mgr - US'),true,false)}"---->
<apex:pageBlock id="jobProfileSection" >
<table width="100%" border="1" cellpadding="5" cellspacing="8">
<tr>
<td align="left" colspan="2"><h3>Job Profiles</h3></td>
</tr>
<tr>
<td width="25%" valign="top" height="265px;">
<apex:outputPanel id="componentPnl">
<c:JobProfileComponent userId="{!SelectedUserId}" id="JpComponent"/>
</apex:outputPanel>
</td>
<td rowspan="2" width="75%" valign="top">
<table cellpadding="0" cellspacing="0" border="0" class="display" id="JobprofileTable" >
<thead>
<tr>
<th>Job profile Name</th>
<th>Job Profile ID</th>
<th>BranchID</th>
<th>Valuation</th>
<th>GC Name</th>
<th>JS City</th>
<th>JS State</th>
<th>Job Name</th>
<th>JS Zip</th>
</tr>
</thead>
<tbody>
<apex:repeat value="{!LstJobProfileGrid}" var="c">
<tr>
<td align="left" style="font-colour: black;">{!c.Name}</td>
<td align="center">{!c.Job_Profile_ID__c}</td>
<td align="center">{!c.Branch_ID__c}</td>
<td align="center">{!c.Valuation__c}</td>
<td align="center">{!c.GC_Awarded_Dodge__c}</td>
<td align="center">{!c.Job_Site_City__c}</td>
<td align="center">{!c.Job_Site_State__c}</td>
<td align="center">{!c.Name}</td>
<td align="center">{!c.Job_Site_Zip__c}</td>
</tr>
</apex:repeat>
</tbody>
</table>
</td>
</tr>
</table>
</apex:pageBlock>
<!-- ----------------------------------------------------Job Profile End------------------------------------------ -->
<!-- ----------------------------------------------------Opportunity section Start------------------------------------------ -->
<apex:pageBlock id="OpportunitySection">
<c:OpportunityComponent userId="{!SelectedUserId}" id="OppComponent"/>
</apex:pageBlock>
<!-- ----------------------------------------------------Opportunity section End------------------------------------------ -->
<!-- ----------------------------------------------------Activity section Starts------------------------------------------ -->
<apex:pageBlock id="TaskSection">
<script type="text/javascript" charset="UTF-8">
$(document).ready( function () {
var oTable4 = $('#TaskTable').dataTable( {
"sPaginationType": "full_numbers",
"aoColumnDefs": [ { "bVisible": false, "aTargets": [ ] }],
"bLengthChange": false,
"iDisplayLength" : 20,
"oColumnFilterWidgets": { "aiExclude": [ 0, 3, 4 ] }
});
});
</script>
<table width="100%" border="0">
<tr>
<td align="left">
<h3>My Activities</h3> <a target="_blank" href="https://cs3.salesforce.com/setup/ui/recordtypeselect.jsp?ent=Opportunity&retURL=%2F006%2Fo&save_new_url=%2F006%2Fe%3FretURL%3D%252F006%252Fo" style="Text-decoration:none;Cursor:pointer"><img src="https://cs3.salesforce.com/resource/1359464023000/ZoomImage" Title="Create New Opportunity"/> Create New Opportunity</a>
</td>
<td align="right">
<apex:selectList value="{!SelectedTaskName}" size="1" style="width:250px;">
<apex:selectOptions value="{!lstTaskOptions}"/>
<apex:actionSupport event="onchange" action="{!ChangeSelectedTaskName}" rerender="TaskSection" status="splashStatus"/>
</apex:selectList>
</td>
</tr>
</table>
<div id="panel" >
<table cellpadding="0" cellspacing="0" border="0" class="display" id="TaskTable" style="margin-top:20px;">
<thead>
<tr>
<th>Subject</th>
<th>Due Date</th>
<th>MMI Call Type</th>
<th>Account Name</th>
<th>Name</th>
<th>Related To</th>
<th>Phone</th>
</tr>
</thead>
<tbody>
<apex:repeat value="{!LstTaskGrid}" var="c">
<tr>
<td>{!c.Subject}</td>
<td style= "{!IF(AND(NOT(ISBLANK(c.ActivityDate)),c.ActivityDate- Today() < 0), 'color:red;', 'color:black;')}">
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
<apex:param value="{!c.ActivityDate}" />
</apex:outputText>
</td>
<td>{!c.Call_Type__c}</td>
<td>{!c.Account.Name}</td>
<td>{!c.Who.Name}</td>
<td>{!c.What.Name}</td>
<td>{!c.Who.Phone}</td>
</tr>
</apex:repeat>
</tbody>
</table>
</div>
</apex:pageBlock>
<!-- ----------------------------------------------------Activity section End------------------------------------------ -->
<!-- ----------------------------------------------------Order and Delivery section Starts------------------------------------------ -->
<div style="width:100%; overflow:auto;border: 1px solid #F00;" >
<apex:pageBlock id="OrderSection">
<script type="text/javascript" charset="UTF-8">
$(document).ready( function () {
var oTable5 = $('#OrderTable').dataTable( {
"sPaginationType": "full_numbers",
"aoColumnDefs": [ { "bVisible": false, "aTargets": [ ] }],
"bLengthChange": false,
"bAutoWidth": false,
"iDisplayLength" : 15,
"oColumnFilterWidgets": { "aiExclude": [ 0, 3, 4 ] }
});
});
</script>
<table width="100%" border="0">
<tr>
<td align="left">
<h3>Orders & Deliveries</h3>
</td>
<td align="right">
<apex:selectList value="{!SelectedlstOrdDelivOptionsName}" size="1" style="width:250px;">
<apex:selectOptions value="{!lstOrdDelivOptions}"/>
<apex:actionSupport event="onchange" action="{!ChangeOrderDelivery}" rerender="OrderSection" status="splashStatus"/>
</apex:selectList><br/><br/>
<apex:selectList value="{!SelectedOrdDelivTimeName}" size="1" style="width:250px;">
<apex:selectOptions value="{!lstOrdDelivTimeOptions}"/>
<apex:actionSupport event="onchange" action="{!ChangeOrderDelivery}" rerender="OrderSection" status="splashStatus"/>
</apex:selectList>
</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="display" id="OrderTable" style="margin-top:20px;">
<thead>
<tr>
<th>Account #</th>
<th>Account Name</th>
<th>Order Type</th>
<th>Transaction Code</th>
<th>Servicing Branch ID</th>
<th>Item Code</th>
<th>Total Amt</th>
<th>Delivery Date</th>
<th>Activation Date</th>
<th>Fuel Surcharge Delivery</th>
<th>Fuel Surcharage PickUp</th>
<th>PPE</th>
<th>LLW</th>
<th>Delivery Contact Name</th>
<th>Delivery Contact #</th>
<th>Order #</th>
</tr>
</thead>
<tbody>
<apex:repeat value="{!LstOrdersAndDelieveriesGrid}" var="c">
<tr>
<td>{!c.Account_Number__c}</td>
<td>{!c.Name}</td>
<td>{!c.Transaction_Code__c}</td>
<td>{!c.Transaction_Code__c }</td>
<td>{!c.Transaction_Code__c}</td>
<td>{!c.Item_Code__c}</td>
<td>{!SUBSTITUTE(TEXT(ROUND(c.Total__c, 0)), ".", "," )}</td>
<td>
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
<apex:param value="{!c.Delivery_Date__c}"/>
</apex:outputText>
</td>
<td>
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
<apex:param value="{!c.Activation_Date__c}"/>
</apex:outputText>
</td>
<td>
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
<apex:param value="{!c.Fuel_Surcharge_Delivery__c}"/>
</apex:outputText>
</td>
<td>
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
<apex:param value="{!c.Fuel_Surcharage_PickUp__c}"/>
</apex:outputText>
</td>
<td>{!c.PPE__c}</td>
<td>{!c.LLW__c}</td>
<td>{!c.Delivery_Contact_Name__c}</td>
<td>{!c.Delivery_Contact_Number__c}</td>
<td>{!c.Order_Number__c}</td>
</tr>
</apex:repeat>
</tbody>
</table>
</apex:pageBlock>
</div>
<!-- ----------------------------------------------------Order and Delivery section End------------------------------------------ -->
</apex:form>
<style>
body{
background-color: #f5f5f5;
}
/*#OrderTable_wrapper {width:100%; overflow:auto;}*/
</style>
</apex:page>
seems that you should to use the following fix:
var j$ = jQuery.noConflict();
The problem is that force.com also includes a lot of javascript libraries that also may use this $ symbol as a shortcut and this can cause all sorts of problems.
Now where ever you would normally use $, use j$.