<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1716073687404477810</id><updated>2012-02-03T02:28:27.897-08:00</updated><category term='mobile'/><category term='Talend'/><category term='multiselect list'/><category term='attachment'/><category term='Duplicate Detector'/><category term='apex'/><category term='remember password'/><category term='processing image'/><category term='heat map'/><category term='documentation'/><category term='heatmap'/><category term='heirarchy'/><category term='javadoc'/><category term='plug-in'/><category term='Import'/><category term='method'/><category term='functions'/><category term='Records Removal'/><category term='border'/><category term='query'/><category term='binary'/><category term='firefox'/><category term='submit'/><category term='payment gateway'/><category term='google map'/><category term='css'/><category term='related list'/><category term='Salesforce mobile'/><category term='DD_roundies'/><category term='rss'/><category term='web service'/><category term='Dupe'/><category term='tMap'/><category term='date picker'/><category term='eclipse'/><category term='base64 encode'/><category term='force.com'/><category term='utility'/><category term='voting'/><category term='partner wsdl'/><category term='uploadify'/><category term='Salesforce'/><category term='java'/><category term='PDF'/><category term='text to speech'/><category term='Android to case'/><category term='export data to excel salesforce'/><category term='Barcode'/><category term='Apex Toolkit for Salesforce'/><category term='VF'/><category term='soap connection'/><category term='Visual Force'/><category term='Poll'/><category term='webservice'/><category term='Map'/><category term='authorize.net'/><category term='Salesforce Duplicate'/><category term='detail page'/><category term='jqdock'/><category term='polling system'/><category term='salesfoce'/><category term='SF Tree'/><category term='aslam'/><category term='Widget'/><category term='relatedlist'/><category term='progress bar'/><category term='Aslam Bari'/><category term='multi sheet excel file'/><category term='jTalk'/><category term='Twitter'/><category term='javascript'/><category term='client'/><category term='gtalk'/><category term='IDE'/><category term='drag and drop'/><category term='form'/><category term='remote salesforce'/><category term='excel'/><category term='Web to case'/><category term='year'/><category term='Dewplayer'/><category term='Data Loading'/><category term='plugin'/><category term='KeySet'/><category term='rounded corner'/><category term='image'/><category term='csv'/><category term='Android'/><category term='menu'/><category term='apexdoc'/><category term='date time'/><category term='feed'/><category term='soap'/><category term='login'/><category term='tool'/><category term='php'/><category term='highlight'/><category term='wsdl2ruby'/><category term='jsp'/><category term='stripe'/><category term='SF Ballot'/><category term='overlay'/><category term='export to excel'/><category term='bar code'/><category term='DupeBlocker'/><category term='file uploading'/><category term='jquery'/><category term='datepicker'/><category term='paypal'/><category term='Ruby'/><category term='call'/><category term='TreeView'/><category term='upload'/><category term='SFMultiSheetExcelGenerator'/><category term='search'/><category term='google reader'/><category term='VLookup'/><category term='multiple file'/><category term='credential'/><category term='password'/><category term='Multi sheet'/><title type='text'>Technology Share - TechShare</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>49</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-2729017666075715703</id><published>2011-12-13T20:42:00.000-08:00</published><updated>2011-12-13T20:59:19.718-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='submit'/><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='overlay'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='form'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='processing image'/><title type='text'>Overlay Effect for VF form submit</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Overlay box is many times used whenever there is a need to show user a processing box and we dont need user do any activity on page while processing is going on. So i am sharing a simple vf component here which has css and js which gives overlay effect in your normal VF pages like below:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&amp;lt;c:overlay style="processing"&amp;gt;&lt;br /&gt;&lt;br /&gt;Here "style" attribute can have two values for now [classic, processing]. Classic style shows gray overlay, and Processing style shows animated image.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-imyycf8oNjk/TugqT_vQw8I/AAAAAAAABmE/9UVZlDOpjKU/s1600/busy.gif"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 200px; height: 200px;" src="http://2.bp.blogspot.com/-imyycf8oNjk/TugqT_vQw8I/AAAAAAAABmE/9UVZlDOpjKU/s320/busy.gif" alt="" id="BLOGGER_PHOTO_ID_5685841052570796994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Here is the steps how you can use this component to achieve overlay effect:&lt;br /&gt;&lt;br /&gt;1) put the component in head section of your page&lt;br /&gt;&amp;lt;c:overlay style="classic"&amp;gt;&lt;br /&gt;&lt;br /&gt;2) put this div at the very bottom of your page, just before close of &amp;lt;/body&amp;gt; tag or &amp;lt;/apex:page&amp;gt; tag&lt;br /&gt;&amp;lt;div id="overlay"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;3) put this &amp;lt;apex:actionstatus in your form&lt;br /&gt;&amp;lt;apex:actionstatus id="overlayStatus" onstart="showOverlay();" onstop="hideOverlay();"&amp;gt;&amp;lt;/apex:actionstatus&amp;gt;&lt;br /&gt;&lt;br /&gt;4) finally refer this action status in your action function or command button as below&lt;br /&gt;&amp;lt;apex:commandbutton action="{!saveRecord}" status="overlayStatus" value="Save" rerender="pBlock"&amp;gt;&lt;br /&gt;&lt;br /&gt;Here is the complete code :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDiv082c5149-d08f-424c-acb7-c4eee9512bdb" style="display:none;margin:0px;"&gt;&lt;iframe id="iframe082c5149-d08f-424c-acb7-c4eee9512bdb" src="http://www.blogtrog.com/code.aspx?id=082c5149-d08f-424c-acb7-c4eee9512bdb" style="width: 600px; height: 200px; border: 1px solid #e0e0e0;margin:0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv082c5149-d08f-424c-acb7-c4eee9512bdb" style="display:block;margin:0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:page &lt;/span&gt;&lt;span style="color:#FF0000;"&gt;controller&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="OverlayDemoController"&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;head&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;c:Overlay &lt;/span&gt;&lt;span style="color:#FF0000;"&gt;style&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="processing"&lt;/span&gt;&lt;span style="color:#FF0000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;head&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:form&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:actionStatus &lt;/span&gt;&lt;span style="color:#FF0000;"&gt;id&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="overlayStatus"&lt;/span&gt;&lt;span style="color:#FF0000;"&gt; onStart&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="showOverlay();"&lt;/span&gt;&lt;span style="color:#FF0000;"&gt; onstop&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="hideOverlay();"&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:actionstatus&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:sectionHeader &lt;/span&gt;&lt;span style="color:#FF0000;"&gt;title&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="Contact Save"&lt;/span&gt;&lt;span style="color:#FF0000;"&gt; subtitle&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="Overlay Demo"&lt;/span&gt;&lt;span style="color:#FF0000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:pageBlock &lt;/span&gt;&lt;span style="color:#FF0000;"&gt;id&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="pBlock"&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:pageMessages&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:pageMessages&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:pageBlockButtons&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;           &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:commandButton &lt;/span&gt;&lt;span style="color:#FF0000;"&gt;action&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="{!saveRecord}"&lt;/span&gt;&lt;span style="color:#FF0000;"&gt; status&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="overlayStatus"&lt;/span&gt;&lt;span style="color:#FF0000;"&gt; value&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="Save"&lt;/span&gt;&lt;span style="color:#FF0000;"&gt; reRender&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="pBlock"&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:pageBlockButtons&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:pageBlockSection&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;               &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:inputField &lt;/span&gt;&lt;span style="color:#FF0000;"&gt;value&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="{!cnt.First_Name__c}"&lt;/span&gt;&lt;span style="color:#FF0000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;              &lt;br /&gt;               &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:inputField &lt;/span&gt;&lt;span style="color:#FF0000;"&gt;value&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="{!cnt.Last_Name__c}"&lt;/span&gt;&lt;span style="color:#FF0000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;               &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:inputField &lt;/span&gt;&lt;span style="color:#FF0000;"&gt;value&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="{!cnt.Phone__c}"&lt;/span&gt;&lt;span style="color:#FF0000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;               &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:inputField &lt;/span&gt;&lt;span style="color:#FF0000;"&gt;value&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="{!cnt.Email__c}"&lt;/span&gt;&lt;span style="color:#FF0000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:pageBlockSection&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:pageBlock&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:form&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;div &lt;/span&gt;&lt;span style="color:#FF0000;"&gt;id&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;="overlay"&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;apex:page&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('082c5149-d08f-424c-acb7-c4eee9512bdb');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;http://www.blogger.com/img/blank.gif&lt;br /&gt;5) Here are the links for working online demo for the overlay :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://labsprojects-developer-edition.ap1.force.com/OverlayDemo"&gt;http://labsprojects-developer-edition.ap1.force.com/OverlayDemo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://labsprojects-developer-edition.ap1.force.com/OverlayDemoProcessing"&gt;http://labsprojects-developer-edition.ap1.force.com/OverlayDemoProcessing&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;6) You can download the complete code from here:&lt;br /&gt;&lt;a href="http://labs.aslambari.com/overlay.zip"&gt;http://labs.aslambari.com/overlay.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hope it will be useful for developers.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;br /&gt;&lt;br /&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('082c5149-d08f-424c-acb7-c4eee9512bdb');&lt;/schttp://www.blogger.com/img/blank.gifript&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5) Here are the links for working online demo for the overlay :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://labsprojects-developer-edition.ap1.force.com/OverlayDemo"&gt;http://labsprojects-developer-edition.ap1.force.com/OverlayDemo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;http://labsprojects-developer-edition.ap1.force.com/OverlayDemoProcessing&lt;br /&gt;&lt;br /&gt;Hope it will be useful for developers.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-2729017666075715703?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/2729017666075715703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/12/overlay-effect-for-vf-form-submit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/2729017666075715703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/2729017666075715703'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/12/overlay-effect-for-vf-form-submit.html' title='Overlay Effect for VF form submit'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-imyycf8oNjk/TugqT_vQw8I/AAAAAAAABmE/9UVZlDOpjKU/s72-c/busy.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-5550242447213564518</id><published>2011-10-06T09:22:00.000-07:00</published><updated>2011-10-06T10:12:06.793-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='payment gateway'/><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='stripe'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><category scheme='http://www.blogger.com/atom/ns#' term='Apex Toolkit for Salesforce'/><title type='text'>Stripe Apex Toolkit</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Today I came to know about 'Stripe' APIs. &lt;a href="https://stripe.com/"&gt;Stripe&lt;/a&gt; is a simple, developer-friendly way to accept payments online. According to &lt;a href="https://stripe.com/"&gt;Stripe&lt;/a&gt; :-&lt;br /&gt;"We believe that enabling transactions on the web is a problem rooted in code, not finance, and we want to help put more websites in business.&lt;br /&gt;Complexity and opacity have traditionally been hallmarks of online payment processing. We want to fix that."&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-VRVlYVhgB24/To3XSUGJeHI/AAAAAAAABlE/Xbu5km4k0KM/s1600/stripe_apex_toolkit.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 85px;" src="http://2.bp.blogspot.com/-VRVlYVhgB24/To3XSUGJeHI/AAAAAAAABlE/Xbu5km4k0KM/s320/stripe_apex_toolkit.jpg" alt="" id="BLOGGER_PHOTO_ID_5660417016306694258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;So, as usual, here I came up with the solution of Apex Wrapper for Stripe APIs. I developed this API library with my colleague &lt;a href="http://twitter.com/SanjayMankani"&gt;Sanjay&lt;/a&gt;. The library gives basic api methods to call and use as follows:&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDiv2620918e-be18-4b2d-9af5-776b2e3e9781" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe2620918e-be18-4b2d-9af5-776b2e3e9781" src="http://www.blogtrog.com/code.aspx?id=2620918e-be18-4b2d-9af5-776b2e3e9781" style="width: 600px; height: 1000px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv2620918e-be18-4b2d-9af5-776b2e3e9781" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;1) CreateCharge&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Stripe request &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Stripe(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;y001LvDyqiGbNZclaaaxxxxttttOJk8w&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;StripeResponseModel response &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; request.createCharge(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;4242424242424242&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;2013&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;10&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;123&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;2000&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;usd&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;testing&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;response.isError){&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Transaction ID :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.id);&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Transaction Fee :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.fee);&lt;br /&gt;}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Error Message :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.errorResponse.message);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Create charge using customer&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Stripe request &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Stripe(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;y001LvDyqiGbNZclaaaxxxxttttOJk8w&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;StripeResponseModel response &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; request.createCharge(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;cus_EPTWuvf7EXDb4g&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;2000&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;usd&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;testing&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;response.isError){&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Transaction ID :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.id);&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Transaction Fee :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.fee);&lt;br /&gt;}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Error Message :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.errorResponse.message);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;2) CreateCustomer&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Stripe request &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Stripe(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;y001LvDyqiGbNZclaaaxxxxttttOJk8w&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;StripeResponseModel response &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; request.createCustomer(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;4242424242424242&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;10&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;2013&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;123&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Aslam&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;IN&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;aslam.bari@gmail.com&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;test&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;response.isError){&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Customer ID :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.id);&lt;br /&gt;}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Error Message :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.errorResponse.message);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;3) RetrieveCustomer&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Stripe request &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Stripe(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;y001LvDyqiGbNZclaaaxxxxttttOJk8w&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;StripeResponseModel response &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; request.retrieveCustomer(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;cus_EPTWuvf7EXDb4g&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;response.isError){&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Customer Country :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.card.country);&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Customer Last4 CC :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.card.last4);&lt;br /&gt;}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Error Message :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.errorResponse.message);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;4) CreateInvoice&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Stripe request &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Stripe(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;y001LvDyqiGbNZclaaaxxxxttttOJk8w&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;StripeResponseModel response &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; request.createInvoice(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;cus_EPTWuvf7EXDb4g&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;2000&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;usd&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;test&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;response.isError){&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Invoice Id :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.id);&lt;br /&gt;}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Error Message :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.errorResponse.message);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;5) RetrieveInvoice&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Stripe request &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Stripe(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;y001LvDyqiGbNZclaaaxxxxttttOJk8w&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;StripeResponseModel response &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; request.retreiveInvoice(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;ii_W19Xp6cxrqVABH&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;response.isError){&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Invoice Date :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.created);&lt;br /&gt;}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Error Message :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.errorResponse.message);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;6) CreatePlan&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Stripe request &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Stripe(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;y001LvDyqiGbNZclaaaxxxxttttOJk8w&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;StripeResponseModel response &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; request.createPlan(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;AMX_101&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;2000&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;usd&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;month&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; , &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;AMX Testing&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;response.isError){&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Plan Id :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.id);&lt;br /&gt;}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Error Message :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.errorResponse.message);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;7) RetreivePlan&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Stripe request &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Stripe(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;y001LvDyqiGbNZclaaaxxxxttttOJk8w&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;StripeResponseModel response &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; request.retrievePlan(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;AMX_101&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;response.isError){&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Plan Label :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.name);&lt;br /&gt;}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Error Message :: &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.errorResponse.message);&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('2620918e-be18-4b2d-9af5-776b2e3e9781');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;You can download the code from github here:&lt;br /&gt;&lt;a href="https://github.com/aslambari/Stripe-Apex-Toolkit"&gt;https://github.com/aslambari/Stripe-Apex-Toolkit&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Or from my website here:&lt;br /&gt;&lt;a href="http://www.aslambari.com/stripe_apex_toolkit.html"&gt;http://www.aslambari.com/stripe_apex_toolkit.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are many more methods which are under development like CreateSubscription, ListAllCustomers etc, we are working on them. And will back soon with full set of methods. Till, try this library and let us know if that works fine for you and revert back us for enhancements.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-5550242447213564518?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/5550242447213564518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/10/stripe-apex-toolkit.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/5550242447213564518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/5550242447213564518'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/10/stripe-apex-toolkit.html' title='Stripe Apex Toolkit'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-VRVlYVhgB24/To3XSUGJeHI/AAAAAAAABlE/Xbu5km4k0KM/s72-c/stripe_apex_toolkit.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-5868605998823014095</id><published>2011-10-01T12:03:00.000-07:00</published><updated>2011-10-01T12:13:11.384-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='image'/><category scheme='http://www.blogger.com/atom/ns#' term='jsp'/><category scheme='http://www.blogger.com/atom/ns#' term='binary'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='base64 encode'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='attachment'/><title type='text'>Showing Salesforce Images/Attachments on PHP/JSP page</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Today I am going to demo you how to fetch images (attachments) from salesforce instance in to your PHP script and how you can show those imags on page as a portal or catalog way.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;1) index.php script&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The below code shows how you can query to attachment object in salesforce to fetch some attachment records. For example i have query the pics (attachment) for my two SFDC contact records in sample code. The concept is simple. You need to query the Id of attachment in your main page, then you will have one another php script which will fetch the SFDC attachment (image)  binary data and show the image on screen as embedded. We can wrap/embed that image in &amp;lt;img /&amp;gt;  tag directly.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id="iframeDiv7a41ef2c-3c66-4f16-abb4-68b98e64ddd5" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe7a41ef2c-3c66-4f16-abb4-68b98e64ddd5" src="http://www.blogtrog.com/code.aspx?id=7a41ef2c-3c66-4f16-abb4-68b98e64ddd5" style="width: 600px; height: 200px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv7a41ef2c-3c66-4f16-abb4-68b98e64ddd5" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;php&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;error_reporting&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;E_ALL&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;require_once&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;soapclient/SforcePartnerClient.php&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;require_once&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;connection.php&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$ids&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;array&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$ids&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[] &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;00390000006IUVK&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$ids&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[] &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;00390000001lwbd&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;getPhotos(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$ids&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;function&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; getPhotos(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$contactids&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;){&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$mySforceConnection&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; getConnection();&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$query&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SELECT Id, Name from Attachment Where ParentId in (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;foreach&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$contactids&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;as&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;){&lt;br /&gt;     &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$query&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;',&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt; }&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$query&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;substr&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$query&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;strlen&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$query&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$query&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$queryResult&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$mySforceConnection&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;query(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$query&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$records&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$queryResult&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;records;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;count&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$records&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;){&lt;br /&gt;     &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;echo&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;table cellspacing='5' cellpadding='5'&amp;gt;&amp;lt;tr&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;     &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;foreach&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$records&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;as&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$rec&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;){&lt;br /&gt;         &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;echo&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;td style='text-align:center;font-size:12px;'&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;                 &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;img src='image.php?id=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$rec&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;' &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;                 &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;style='width:200px;height:200px;border:1px solid #ccc;padding:10px'/&amp;gt; &amp;lt;br/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;                 &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$rec&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;fields&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Name&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;              &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;     }&lt;br /&gt;     &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;echo&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt; }&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;NULL&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('7a41ef2c-3c66-4f16-abb4-68b98e64ddd5');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;2) image.php script&lt;br /&gt;&lt;div style="text-align: justify;"&gt;This code simply accepts one Id of the attachment record and fetch the binary body of attachment, then it shows that image on the screen as image content. To view this image in other page you simply need to wrap/embed its call into &amp;lt;img /&amp;gt; html tag. Like below:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&amp;lt;img src="image.php?id=00P9000000185ioEAA" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id="iframeDiv834251f7-a0ef-4a8b-811c-5b0b483f9a52" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe834251f7-a0ef-4a8b-811c-5b0b483f9a52" src="http://www.blogtrog.com/code.aspx?id=834251f7-a0ef-4a8b-811c-5b0b483f9a52" style="width: 600px; height: 200px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv834251f7-a0ef-4a8b-811c-5b0b483f9a52" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;php&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;error_reporting&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;E_ALL&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;header&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;content-type: image/jpeg&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;require_once&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;soapclient/SforcePartnerClient.php&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;require_once&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;connection.php&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;br /&gt;getPhotos(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$_GET&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;]);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;function&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; getPhotos(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;){&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$mySforceConnection&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; getConnection();&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$query&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SELECT Id, Name, Body from Attachment Where Id ='&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$queryResult&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$mySforceConnection&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;query(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$query&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$records&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$queryResult&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;records;&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;print_r&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;base64_decode&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;$records&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;fields&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Body));&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;NULL&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('834251f7-a0ef-4a8b-811c-5b0b483f9a52');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the demo of the scripts where i am fetching two contact's images from Salesforce and showing on simple PHP page.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://labs.aslambari.com/sfdc_photos_demo/"&gt;http://labs.aslambari.com/sfdc_photos_demo/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-5868605998823014095?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/5868605998823014095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/10/showing-salesforce-imagesattachments-on.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/5868605998823014095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/5868605998823014095'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/10/showing-salesforce-imagesattachments-on.html' title='Showing Salesforce Images/Attachments on PHP/JSP page'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-3521502971726438905</id><published>2011-09-13T08:33:00.000-07:00</published><updated>2011-09-13T11:12:39.438-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='file uploading'/><category scheme='http://www.blogger.com/atom/ns#' term='uploadify'/><category scheme='http://www.blogger.com/atom/ns#' term='progress bar'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='multiple file'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='attachment'/><category scheme='http://www.blogger.com/atom/ns#' term='upload'/><title type='text'>SF Uploadify: File Uploading Utility for Salesforce</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I have created a very cool file uploading utility which can be integrated with any system, but mainly I focused on Salesforce. This utility is built using Uploadify Tool and PHP integration. You can find more info about &lt;a href="http://www.uploadify.com/"&gt;Uploadify&lt;/a&gt; &lt;a href="http://www.uploadify.com/"&gt;here&lt;/a&gt;. It supports multiple file uploading with progress bar and uploads the file to your external server (php server where your site or this utility is hosted.) Then it makes the Attachment record in salesforce  and links to actual file on server. So you can directly (natively) access your files.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-aPQPZnjl6pg/Tm-dAHnbHoI/AAAAAAAABk8/-geKLHR36dk/s1600/sf_uploadify.gif"&gt;&lt;img style="cursor: pointer; width: 320px; height: 68px;" src="http://1.bp.blogspot.com/-aPQPZnjl6pg/Tm-dAHnbHoI/AAAAAAAABk8/-geKLHR36dk/s320/sf_uploadify.gif" alt="" id="BLOGGER_PHOTO_ID_5651908682743225986" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How it works:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;User opens any record in salesforce , lets say "Account" record.&lt;/li&gt;&lt;li&gt;There will be a custom button (given in below code), user clicks on button&lt;/li&gt;&lt;li&gt;One file uploading screen opens, click on 'Select Files" button and select multiple files at same time (using control button)&lt;/li&gt;&lt;li&gt;As soon as, user select and close dialog, it starts uploading files with progress bar&lt;/li&gt;&lt;li&gt;The files will be stored on the Server where this utility exists, for now it saves to my server.&lt;/li&gt;&lt;li&gt;It will show finally a screen with close button.&lt;/li&gt;&lt;li&gt;Click on close button , it will refresh the parent window (if not, manually refresh the parent record)&lt;/li&gt;&lt;li&gt;Open the attachments section, you will find the new files (attachments created, which actually a link for actual files on the server)&lt;/li&gt;&lt;li&gt;Click on any file and click on "View" link.&lt;/li&gt;&lt;li&gt; And you will see it opens your uploaded actual file :)&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;More Details and Updates on my site:&lt;br /&gt;&lt;a href="http://www.aslambari.com/sf_uploadify.html"&gt;http://www.aslambari.com/sf_uploadify.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Installation:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;1) &lt;span style="font-weight: bold;"&gt;Button code:&lt;/span&gt;&lt;br /&gt;Make one custom button (detail screen button), on any object, for example , account object, see below code.&lt;br /&gt;a. Behavior must be "Open in new window"&lt;br /&gt;b. Content Source will be "URL"&lt;br /&gt;The url for the button will be as below&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;http://labs.aslambari.com/sf_file_uploader/sf_setup_uploader.php?sessionid={!$Api.Session_ID}&amp;amp;serverurl={!$Api.Partner_Server_URL_220}&amp;amp;recordid={!Account.Id}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2) &lt;span style="font-weight: bold;"&gt;Utility Code:&lt;/span&gt;&lt;br /&gt;The utility is on my server for now, it is in BETA, once all is tested and working , i will make it public :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Note: For commercial use this tool, you first need to go to &lt;/span&gt;&lt;a style="font-style: italic;" href="http://www.uploadify.com/"&gt;Uploadify&lt;/a&gt;&lt;span style="font-style: italic;"&gt; site and check its license type if any. Because my tool uses the Uploadify internally.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;See the screen cast how it works:&lt;br /&gt;&lt;a href="http://screencast.com/t/ibDqgMBbfQ"&gt;http://screencast.com/t/ibDqgMBbfQ&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hope you will like it. :)&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-3521502971726438905?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/3521502971726438905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/09/sf-uploadify-file-uploading-utility-for.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/3521502971726438905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/3521502971726438905'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/09/sf-uploadify-file-uploading-utility-for.html' title='SF Uploadify: File Uploading Utility for Salesforce'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-aPQPZnjl6pg/Tm-dAHnbHoI/AAAAAAAABk8/-geKLHR36dk/s72-c/sf_uploadify.gif' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-7817749783276049178</id><published>2011-09-10T05:29:00.000-07:00</published><updated>2011-09-10T06:01:43.977-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='heatmap'/><category scheme='http://www.blogger.com/atom/ns#' term='heat map'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='salesfoce'/><category scheme='http://www.blogger.com/atom/ns#' term='google map'/><title type='text'>Heat Map using Google Map in Salesforce</title><content type='html'>Hi All,&lt;br /&gt;Recently i came across for one requirement with my client where he wants to see density of his shops across US. For example he has a lot of branches of his coffee shops across US like in CA, TX, MB etc. He want to see a good way on map to see density of his branches. I found the way how to show this, this type of maps are called HeatMaps.&lt;br /&gt;&lt;br /&gt;Heat Maps are used to show density of your prouduct, services and any useful information on Geaographical area, based on your addresses.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-vrRMVOTNKM4/TmtaQeuTe8I/AAAAAAAABks/nsIKX4W_Gx0/s1600/heap-map-google.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 281px;" src="http://2.bp.blogspot.com/-vrRMVOTNKM4/TmtaQeuTe8I/AAAAAAAABks/nsIKX4W_Gx0/s320/heap-map-google.jpg" alt="" id="BLOGGER_PHOTO_ID_5650709396638104514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The another example may be like, i want to know Starbucks shops across the US and want to know which area has density (number of shops) more.&lt;br /&gt;So, i created one example in Salesforce VF page to show, how we can make it.&lt;br /&gt;&lt;br /&gt;1. Copy paste below code in your VF page&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDivc35f7fb2-97fa-4414-aded-9c79d3b3a0ff" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframec35f7fb2-97fa-4414-aded-9c79d3b3a0ff" src="http://www.blogtrog.com/code.aspx?id=c35f7fb2-97fa-4414-aded-9c79d3b3a0ff" style="width: 600px; height: 200px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDivc35f7fb2-97fa-4414-aded-9c79d3b3a0ff" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;showHeader&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="false"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; sidebar&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="false"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;src&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="http://www.heatmapapi.com/javascript/HeatmapAPI.aspx?k=86123b76-2190-4a4b-b182-86e7199b0406"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="text/javascript"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;src&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=ABQIAAAA09SA9e7gW5A4Mpy3VCJQjxQfiV3Wc4AiuMkI_RwI0dk2dVyy7hQWusr2PE1VCubWNkTco2njprfSxg"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="text/javascript"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;src&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="http://www.heatmapapi.com/javascript/HeatmapAPIGoogle.js"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="text/javascript"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="text/javascript"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt; src&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="http://maps.google.com/maps/api/js?sensor=false"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="text/javascript"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; m &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; batch &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; myHM &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; request &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; GXmlHttp.create();&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; TOTAL_COUNT &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; INDEX &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;function&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; loadGoogle()&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; (GBrowserIsCompatible())&lt;br /&gt;{&lt;br /&gt;m &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; GMap2(document.getElementById(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;map&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;m.setCenter(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; GLatLng(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;38.5&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;-&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;95.8&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;), &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;3&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;m.setUIToDefault();&lt;br /&gt;initHeatmap();&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;&lt;br /&gt;alert(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;Your Internet browser is not compatible    with this website.&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;function&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; initHeatmap()&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt; Heatmap Scripts&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;try&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;&lt;br /&gt;{&lt;br /&gt;myHM &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; GEOHeatmap();&lt;br /&gt;myHM.Init(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;400&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;400&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;); &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt; Must be same as map size, or same ratio&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;  addMarkersFromXml();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;catch&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;(e)&lt;br /&gt;{&lt;br /&gt;alert(e);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;function&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; addMarkersFromXml(){&lt;br /&gt;&lt;br /&gt;request.open(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;GET&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;/apex/data&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;true&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;request.onreadystatechange &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;function&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;() {&lt;br /&gt;    &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;alert(request.readyState);&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;(request.readyState &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;4&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;) {&lt;br /&gt;        &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; xmlDoc &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; request.responseXML;&lt;br /&gt;        &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; markers &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; xmlDoc.documentElement.getElementsByTagName(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;store&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;        TOTAL_COUNT &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; markers.length;&lt;br /&gt;        INDEX &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;        &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;for&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; i&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;; i &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; markers.length; i&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;++&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;){&lt;br /&gt;            &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; state &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; markers[i].getAttribute(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;state&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;            &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; density &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;markers[i].getAttribute("density");&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;                geocoder &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; GClientGeocoder();&lt;br /&gt;            &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; address &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; state;&lt;br /&gt;            geocoder.getLatLng(address,&lt;br /&gt;                  &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;function&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;(point) {&lt;br /&gt;                    &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;!&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;point) {&lt;br /&gt;                  &lt;br /&gt;                    } &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; {&lt;br /&gt;                      fullVal &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; point.lat().toFixed(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;5&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;) &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; point.lng().toFixed(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;5&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;) &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; density &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;                      batch &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; fullVal;&lt;br /&gt;                      INDEX&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;++&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;                      &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;(INDEX &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;&amp;gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; TOTAL_COUNT){&lt;br /&gt;                        startMap();&lt;br /&gt;                      }&lt;br /&gt;                    }&lt;br /&gt;            });&lt;br /&gt;        }&lt;br /&gt;    &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;function&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; startMap(){&lt;br /&gt;        document.getElementById(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;HMMapdata&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;).value&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;batch;&lt;br /&gt;         myHM.SetData(batch);&lt;br /&gt;         myHM.SetBoost(.&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;5&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;); &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt; Optional, see documentation&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;              myHM.SetDecay(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;); &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt; Optional, see documentation&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;              &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;var proxyURL = "http://localhost/proxy.php";&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;              &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;myHM.SetProxyURL(proxyURL);&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;              &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; preUrl &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; myHM.GetURL();&lt;br /&gt;&lt;br /&gt;          &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt; Now render in our Google Map&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;              &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;var&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; heatmapOverlay &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt; HMGoogleOverlay(preUrl);&lt;br /&gt;          m.addOverlay(heatmapOverlay);&lt;br /&gt;}&lt;br /&gt;request.send(&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:sectionHeader &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;subtitle&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Heat Map using Google Map"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; title&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Aslam Bari (http://www.aslambari.com)"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;body &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;onload&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="loadGoogle();"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;input &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="hidden"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="HMMapdata"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;input &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="hidden"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="HMImageURL"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; name&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="HMImageURL"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;div &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="map"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; style&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="width:400px;height:400px;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;div&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;body&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('c35f7fb2-97fa-4414-aded-9c79d3b3a0ff');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Create another page called "data" and copy paste below code in that. Note: this page contains the addresses of your shops, offices etc which we want to see as density. So, change accordingly&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDiv99736f04-682d-4035-9b4a-7e67bb343b5e" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe99736f04-682d-4035-9b4a-7e67bb343b5e" src="http://www.blogtrog.com/code.aspx?id=99736f04-682d-4035-9b4a-7e67bb343b5e" style="width: 600px; height: 200px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv99736f04-682d-4035-9b4a-7e67bb343b5e" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;sidebar&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="false"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; showHeader&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="false"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; contentType&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="text/xml"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;stores&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;store &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;state&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="IN,US"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;store&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;store &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;state&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="KY,US"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;store&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;store &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;state&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="WA,US"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;store&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;store &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;state&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="MB,US"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;store&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;stores&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('99736f04-682d-4035-9b4a-7e67bb343b5e');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Note: you need to go http://www.heatmapapi.com to get new Free API key and also for google free api key to get your code work.&lt;br /&gt;&lt;br /&gt;Here is the working example of this. Click to see.&lt;br /&gt;&lt;a href="http://labsprojects-developer-edition.ap1.force.com/HeatMapExample"&gt;http://labsprojects-developer-edition.ap1.force.com/HeatMapExample&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hope you will need this sometime in your project.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-7817749783276049178?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/7817749783276049178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/09/heat-map-using-google-map-in-salesforce.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/7817749783276049178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/7817749783276049178'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/09/heat-map-using-google-map-in-salesforce.html' title='Heat Map using Google Map in Salesforce'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-vrRMVOTNKM4/TmtaQeuTe8I/AAAAAAAABks/nsIKX4W_Gx0/s72-c/heap-map-google.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-5571192894681564350</id><published>2011-09-03T17:41:00.000-07:00</published><updated>2011-09-03T17:54:44.322-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='login'/><category scheme='http://www.blogger.com/atom/ns#' term='password'/><category scheme='http://www.blogger.com/atom/ns#' term='credential'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='remember password'/><title type='text'>Make Firefox wise to remember Salesforce Credentials</title><content type='html'>Hi All,&lt;br /&gt;I am back after a long break :). Today i want to share a good trick which help me to save my time in many ways. Thanks to my friend (Abdul Vahid) who given me hint for that.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Problem:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Most of you (developers) are aware that these days salesforce has disabled the remember password functionality. It does not save or prompt to save any password when you login to the org. It is very hectic to maintain some external doc or sheet for passowrd , for a developer who work and develop in many orgs. For example i work in 20 orgs (sandbox, production) some times. I maintain a separate doc to look and find password whenever i need to work in a org. That takes time and sometimes not easy.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;So here is the solution trick :)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Find out where you installed your firefox and go to Components folder. My location is like this "D:\Mozilla Firefox\components".&lt;/li&gt;&lt;li&gt;Find the "nsLoginManager.js" file and open this in any editor. Before doing this you need to close all instances of firefox.&lt;/li&gt;&lt;li&gt;Find out following line of code and comment it. I found it near line #805.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Before comment&lt;/span&gt;&lt;br /&gt;&lt;div id="iframeDiv1cc928c2-13f8-4cd7-bd57-0522ee9eeb0a" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe1cc928c2-13f8-4cd7-bd57-0522ee9eeb0a" src="http://www.blogtrog.com/code.aspx?id=1cc928c2-13f8-4cd7-bd57-0522ee9eeb0a" style="width: 600px; height: 200px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv1cc928c2-13f8-4cd7-bd57-0522ee9eeb0a" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;_isAutocompleteDisabled :  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;function&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (element) {&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (element &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; element.hasAttribute(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;autocomplete&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;           element.getAttribute(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;autocomplete&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;).toLowerCase() &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;off&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;true&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;   },&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('1cc928c2-13f8-4cd7-bd57-0522ee9eeb0a');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;After comment&lt;/span&gt;&lt;br /&gt;&lt;div id="iframeDiv9af4ba0f-95b0-4f14-9489-40afb887f862" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe9af4ba0f-95b0-4f14-9489-40afb887f862" src="http://www.blogtrog.com/code.aspx?id=9af4ba0f-95b0-4f14-9489-40afb887f862" style="width: 600px; height: 200px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv9af4ba0f-95b0-4f14-9489-40afb887f862" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;_isAutocompleteDisabled :  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;function&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (element) {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;if (element &amp;amp;&amp;amp; element.hasAttribute("autocomplete") &amp;amp;&amp;amp;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;          &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;  element.getAttribute("autocomplete").toLowerCase() == "off")&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;return true;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;    },&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('9af4ba0f-95b0-4f14-9489-40afb887f862');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Save the file and start your firefox again.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(Note: The above steps given for Firefox 3.6 version. In other version it may differ)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now see, whenever you try to login with username/pwd. Firefox will ask (prompt) you about "remember" password feature. Once you click on "Remember". It will save your username/password for your org. Next time when ever you try to login using your username, it will auto fill password like old days :)&lt;br /&gt;&lt;br /&gt;Now, i do not need to maintain any external password doc. Isn't it cool :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-5571192894681564350?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/5571192894681564350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/09/make-firefox-wise-to-remember.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/5571192894681564350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/5571192894681564350'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/09/make-firefox-wise-to-remember.html' title='Make Firefox wise to remember Salesforce Credentials'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-3311556343092926695</id><published>2011-07-16T22:26:00.000-07:00</published><updated>2011-07-17T03:02:16.637-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='soap connection'/><category scheme='http://www.blogger.com/atom/ns#' term='remote salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><category scheme='http://www.blogger.com/atom/ns#' term='partner wsdl'/><category scheme='http://www.blogger.com/atom/ns#' term='Apex Toolkit for Salesforce'/><title type='text'>Apex Toolkit for Salesforce</title><content type='html'>Hi All,&lt;br /&gt;Its a long time since I last posted :). So i am back with something interesting and useful contents again.&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Most of us known that whenever we want to connect with any salesforce org and do query the data with any langugae, salesforce gives us some toolkit like PHP toolkit, Java toolkit, Ruby Toolkit, Flex Toolkit etc. But what when we want to connect with a remote Salesforce instance within salesforce only, using native Apex language. People use many alternate to achieve it, some uses partner wsdl to generate apex or some uses javascript toolkit. But I find them not easy to use and not easy to setup and they did not fit in my need.&lt;br /&gt;&lt;/div&gt;So I come up with my own Apex Toolkit for Salesforce :)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-WYBYRltYeEY/TiJy1RdvAbI/AAAAAAAABkM/J2uyekbzm6c/s1600/ApexToolkitFotSalesforce.jpg"&gt;&lt;img style="cursor: pointer; width: 160px; height: 121px;" src="http://1.bp.blogspot.com/-WYBYRltYeEY/TiJy1RdvAbI/AAAAAAAABkM/J2uyekbzm6c/s320/ApexToolkitFotSalesforce.jpg" alt="" id="BLOGGER_PHOTO_ID_5630188743713292722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Its easy to install package. You can install it from here:&lt;br /&gt;&lt;a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t90000000Priq"&gt;&lt;/a&gt;&lt;a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t90000000Priq"&gt;https://login.salesforce.com/packaging/installPackage.apexp?p0=04t90000000Priq&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For successful connectivity to any remote instance one entry for that salesforce server TYPE must be there in your remote site setting. I have by default included in package (NA1 to NA7) server url for salesforce. You can add more like (CS1 - CS9, NA1 - NA11, AP1 - AP10). For example see the below screen shot how i added most likely used server instances in my remote site settings. There must be 20-25 possible entries at most in my opinion.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-_21qD7UUtQU/TiJ6cuCMtgI/AAAAAAAABkU/gVoHdEsrMj0/s1600/remotesite.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 261px;" src="http://3.bp.blogspot.com/-_21qD7UUtQU/TiJ6cuCMtgI/AAAAAAAABkU/gVoHdEsrMj0/s320/remotesite.jpg" alt="" id="BLOGGER_PHOTO_ID_5630197117978719746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;It is very easy to use with only simple some lines of code to login and do a query to remote instance as below:&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDiv34fd7e8f-42fb-4a55-86c3-68b4e4f868c3" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe34fd7e8f-42fb-4a55-86c3-68b4e4f868c3" src="http://www.blogtrog.com/code.aspx?id=34fd7e8f-42fb-4a55-86c3-68b4e4f868c3" style="width: 600px; height: 200px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv34fd7e8f-42fb-4a55-86c3-68b4e4f868c3" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SFConnectionController controller &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; SFConnectionController();&lt;br /&gt;LoginResult loginResult &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; controller.login(username, password, securityToken);&lt;br /&gt;Response response &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; controller.query(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;select Name, Email, Phone, MailingCity, MailingCountry from Contact&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, loginResult);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;for&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(Record row: response.data.records){&lt;br /&gt;string Name &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; row.getFieldValue(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Name&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;string Email &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; row.getFieldValue(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Email&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;string Phone &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; row.getFieldValue(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Phone&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;string MailingCity &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; row.getFieldValue(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;MailingCity&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;string MailingCountry &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; row.getFieldValue(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;MailingCountry&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('34fd7e8f-42fb-4a55-86c3-68b4e4f868c3');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;There is one demo page and controller in package which shows how to use this functionality.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SFConnectionDemo&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SFConnectionDemoController&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The toolkit is just a start and gives users facility to do login and do simple queries on objects. One can easily extend this for better version. If you want to contribute in this, i have shared this project as open source here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/apex-toolkit-for-salesforce/"&gt;http://code.google.com/p/apex-toolkit-for-salesforce/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is one running online demo which shows how this package works. Just give your developer/production org's username, password (or securityToken as well), and click on search button. It will fetch the contact records from your organization and will display in table below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://labsprojects-developer-edition.ap1.force.com/SFConnectionDemo"&gt;http://labsprojects-developer-edition.ap1.force.com/SFConnectionDemo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hope you will like it :)&lt;br /&gt;Mail me for any configuration or setup issues and for feedback.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-3311556343092926695?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/3311556343092926695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/07/apex-toolkit-for-salesforce.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/3311556343092926695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/3311556343092926695'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/07/apex-toolkit-for-salesforce.html' title='Apex Toolkit for Salesforce'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-WYBYRltYeEY/TiJy1RdvAbI/AAAAAAAABkM/J2uyekbzm6c/s72-c/ApexToolkitFotSalesforce.jpg' height='72' width='72'/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-6185490631598568602</id><published>2011-05-28T05:41:00.000-07:00</published><updated>2011-05-28T14:23:35.169-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='payment gateway'/><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='VF'/><category scheme='http://www.blogger.com/atom/ns#' term='authorize.net'/><category scheme='http://www.blogger.com/atom/ns#' term='paypal'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><title type='text'>Authorize.Net Apex Library: Salesforce and Authorize.Net Integration</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Recently I came across one requirement where end user wants an easy way to pay fixed amount online from Salesforce to third party something like Donate page. In one of my previous post i showed you how you can do that using Paypal. Here is that paypal solution:&lt;br /&gt;&lt;/div&gt;&lt;a href="http://techsahre.blogspot.com/2011/01/simple-paypal-integration-with.html"&gt;http://techsahre.blogspot.com/2011/01/simple-paypal-integration-with.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I was thinking to implement the same thing but this time end user wanted something simpler easy to use and easy to test solution. Then i found that 'Authorize.Net' is one of the good solution for this type of requirements. Then i created one simple ready to use online payment tool in salesforce using 'Authorize.Net' as payment gateway.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-1bn0M2Ju9bw/TeD12jlnMUI/AAAAAAAABik/aqPnL13p-0w/s1600/Authorize.Net%2BApex%2BLibrary.jpg"&gt;&lt;img style="cursor: pointer; width: 160px; height: 79px;" src="http://4.bp.blogspot.com/-1bn0M2Ju9bw/TeD12jlnMUI/AAAAAAAABik/aqPnL13p-0w/s320/Authorize.Net%2BApex%2BLibrary.jpg" alt="" id="BLOGGER_PHOTO_ID_5611755453318377794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I found a good tutorial here in PHP how to make that &lt;a style="font-weight: bold; color: rgb(51, 51, 255);" href="http://www.merchant-account-services.org/article/authorize-net-php-integration"&gt;here&lt;/a&gt;. I used the same idea and rebuild my Apex solution.&lt;br /&gt;&lt;br /&gt;You can download the package from this link:&lt;br /&gt;&lt;a style="color: rgb(51, 51, 255);" href="https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t90000000PqIH"&gt;https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t90000000PqIH&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Before using the tool, you first need to follow some basic things:&lt;br /&gt;&lt;br /&gt;1) For checking/testing the things you need first test accounts. Go to &lt;a href="https://developer.authorize.net/testaccount/"&gt;"test account"&lt;/a&gt; page on Authorize.Net and create one merchant account (Card Not Present).&lt;br /&gt;&lt;br /&gt;2) Change your "login" and "transkey" variables in "AuthorizeDotNet" class with the merchant account's API login id and transaction id.&lt;br /&gt;&lt;br /&gt;After that you can simply use VF page "DoPayment" to see how this works.&lt;br /&gt;/apex/DoPayment&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-UMG0ggJwSiY/TeFnQXS1pNI/AAAAAAAABis/GUEMO02Ukf4/s1600/authorize.net.png"&gt;&lt;img style="cursor: pointer; width: 281px; height: 320px;" src="http://2.bp.blogspot.com/-UMG0ggJwSiY/TeFnQXS1pNI/AAAAAAAABis/GUEMO02Ukf4/s320/authorize.net.png" alt="" id="BLOGGER_PHOTO_ID_5611880141508945106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;On click of submit you will get information about your transaction, if successful it will show you transaction id and success message. Otherwise will show error message.&lt;br /&gt;&lt;br /&gt;Check out this easy cool stuff and give me feed backs as always.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-6185490631598568602?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/6185490631598568602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/05/authorizenet-apex-library-salesforce.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/6185490631598568602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/6185490631598568602'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/05/authorizenet-apex-library-salesforce.html' title='Authorize.Net Apex Library: Salesforce and Authorize.Net Integration'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-1bn0M2Ju9bw/TeD12jlnMUI/AAAAAAAABik/aqPnL13p-0w/s72-c/Authorize.Net%2BApex%2BLibrary.jpg' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-5711625774123969744</id><published>2011-05-25T11:51:00.001-07:00</published><updated>2011-05-25T12:08:43.037-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='export to excel'/><category scheme='http://www.blogger.com/atom/ns#' term='csv'/><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='SFMultiSheetExcelGenerator'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='excel'/><category scheme='http://www.blogger.com/atom/ns#' term='multi sheet excel file'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='Multi sheet'/><category scheme='http://www.blogger.com/atom/ns#' term='export data to excel salesforce'/><title type='text'>Generate Multi Sheet Excel File In Salesforce</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Recently I came across with a requirement where I need to generate excel file from SFDC data of some objects. Traditionally we do this by making csv file. But here the challenge was that i need to fetch data from multiple objects and make single Excel File with different Sheet (tabs), each sheet belongs to single object and contains that object data. So here is  code, how i achieve it.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;Here is the link you can download the code from :&lt;br /&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://www.aslambari.com/downloads/SFMultiSheetExcelGenerator.zip"&gt;SFMultiSheetExcelGenerator&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.aslambari.com/downloads/SFMultiSheetExcelGenerator.zip"&gt;http://www.aslambari.com/downloads/SFMultiSheetExcelGenerator.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The folder contains some VF pages and some classes. There is one demo VF page also which contains a button which generates the sample excel file with contacts and accounts data. You can see the working demo here:&lt;br /&gt;&lt;/div&gt;&lt;a href="https://labsprojects-developer-edition.ap1.force.com/MultiSheetExcelGenerateDemo"&gt;https://labsprojects-developer-edition.ap1.force.com/MultiSheetExcelGenerateDemo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There is a component which is responsible to generate the excel data. You can see the sample code in  "MultiSheetExcelGenerate.page" VF page. Here is the code , how you use this component:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDiv763bf9a4-4958-40e0-982f-5e1605005f25" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe763bf9a4-4958-40e0-982f-5e1605005f25" src="http://www.blogtrog.com/code.aspx?id=763bf9a4-4958-40e0-982f-5e1605005f25" style="width: 600px; height: 100px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv763bf9a4-4958-40e0-982f-5e1605005f25" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;controller&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="MultiSheetExcelGenerate"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; sidebar&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="false"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; showHeader&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="false"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; contentType&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="application/vnd.ms-excel#myfile.xls"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;c:multisheetexcelcomponent &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;datamodel&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="{!dm}"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('763bf9a4-4958-40e0-982f-5e1605005f25');&lt;/script&gt;&lt;br /&gt;Have a look and use the code as per your need and mail me with your valuable feed backs as always :)&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-5711625774123969744?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/5711625774123969744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/05/generate-multi-sheet-excel-file-in.html#comment-form' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/5711625774123969744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/5711625774123969744'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/05/generate-multi-sheet-excel-file-in.html' title='Generate Multi Sheet Excel File In Salesforce'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-7557787605733268696</id><published>2011-05-21T03:52:00.001-07:00</published><updated>2011-05-21T04:47:49.773-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='Web to case'/><category scheme='http://www.blogger.com/atom/ns#' term='mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='Android to case'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce mobile'/><title type='text'>'Android To Case' : Android App to log Salesforce Case</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Most of you may know "Web To Case" functionality of Salesforce. I have used the same concept and reuse that idea to make simple Android App, which works exactly same as "Web to case", so i called this app as "Android To Case".&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Here is some screen shot how it will look like:&lt;br /&gt;&lt;br /&gt;1) &lt;span style="font-weight: bold;"&gt;Initial Screen:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-iQuK3ePeBD0/Tdeiun72VjI/AAAAAAAABiU/U4OWf_Hnamc/s1600/Android_to_case.jpg"&gt;&lt;img style="cursor: pointer; width: 186px; height: 320px;" src="http://2.bp.blogspot.com/-iQuK3ePeBD0/Tdeiun72VjI/AAAAAAAABiU/U4OWf_Hnamc/s320/Android_to_case.jpg" alt="" id="BLOGGER_PHOTO_ID_5609130782790932018" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;2) &lt;span style="font-weight: bold;"&gt;After Submit below screen will come:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-xpxZ3umrwhA/Tdei9bc_CnI/AAAAAAAABic/1CH1_GuApYM/s1600/case_success.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 144px;" src="http://2.bp.blogspot.com/-xpxZ3umrwhA/Tdei9bc_CnI/AAAAAAAABic/1CH1_GuApYM/s320/case_success.jpg" alt="" id="BLOGGER_PHOTO_ID_5609131037138291314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The code and app is simple. Here is the main code as below:&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDivae4fdb3c-f5ae-4994-a668-91e8f6ce9040" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframeae4fdb3c-f5ae-4994-a668-91e8f6ce9040" src="http://www.blogtrog.com/code.aspx?id=ae4fdb3c-f5ae-4994-a668-91e8f6ce9040" style="width: 600px; height: 400px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDivae4fdb3c-f5ae-4994-a668-91e8f6ce9040" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;package&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; com.androidsfdc.androidtocase;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; java.io.BufferedReader;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; java.io.DataOutputStream;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; java.io.InputStream;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; java.io.InputStreamReader;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; java.net.URL;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; java.net.URLEncoder;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; javax.net.ssl.HttpsURLConnection;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; android.app.Activity;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; android.os.Bundle;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; android.view.View;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; android.widget.Button;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; android.widget.EditText;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;import&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; android.widget.Toast;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; AndroidToCase &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;extends&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Activity {&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;/**&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Called when the activity is first created. &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;*/&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;final&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; String ORGID &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;00D###0###0###G&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;br /&gt;  @Override&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; onCreate(Bundle savedInstanceState) {&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;super&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.onCreate(savedInstanceState);&lt;br /&gt;      setContentView(R.layout.main);&lt;br /&gt;      Button btn &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (Button) findViewById(R.id.submit);&lt;br /&gt;&lt;br /&gt;      btn.setOnClickListener(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; View.OnClickListener() {&lt;br /&gt;&lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; onClick(View v) {&lt;br /&gt;              &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;try&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; {&lt;br /&gt;                  EditText name &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (EditText) findViewById(R.id.contactName);&lt;br /&gt;                  EditText email &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (EditText) findViewById(R.id.email);&lt;br /&gt;                  EditText phone &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (EditText) findViewById(R.id.phone);&lt;br /&gt;                  EditText subject &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (EditText) findViewById(R.id.subject);&lt;br /&gt;                  EditText description &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (EditText) findViewById(R.id.description);&lt;br /&gt;                  StringBuffer params &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; StringBuffer();&lt;br /&gt;                  params.append(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;orgid=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; URLEncoder.encode(ORGID, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;UTF-8&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;                  params.append(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;amp;name=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;                          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; URLEncoder.encode(name.getText().toString(),&lt;br /&gt;                                  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;UTF-8&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;                  params.append(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;amp;email=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;                          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; URLEncoder.encode(email.getText().toString(),&lt;br /&gt;                                  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;UTF-8&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;                  params.append(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;amp;phone=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;                          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; URLEncoder.encode(phone.getText().toString(),&lt;br /&gt;                                  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;UTF-8&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;                  params.append(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;amp;subject=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;                          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; URLEncoder.encode(subject.getText().toString(),&lt;br /&gt;                                  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;UTF-8&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;                  params.append(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;amp;description=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;                          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; URLEncoder.encode(description.getText()&lt;br /&gt;                                  .toString(), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;UTF-8&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;                  String output &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; excutePost(&lt;br /&gt;                          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;https://www.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                          params.toString());&lt;br /&gt;                  name.setText(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;                  email.setText(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;                  phone.setText(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;                  subject.setText(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;                  description.setText(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;                  Toast.makeText(getBaseContext(), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Case is successfully Created!!!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                          Toast.LENGTH_LONG).show();&lt;br /&gt;                &lt;br /&gt;              } &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;catch&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (Exception ex) {&lt;br /&gt;                  ex.printStackTrace();&lt;br /&gt;              }&lt;br /&gt;          }&lt;br /&gt;      });&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; String excutePost(String targetURL, String urlParameters) {&lt;br /&gt;      URL url;&lt;br /&gt;      HttpsURLConnection connection &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;try&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; {&lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Create connection&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            url &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; URL(targetURL);&lt;br /&gt;          connection &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (HttpsURLConnection) url.openConnection();&lt;br /&gt;          connection.setRequestMethod(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;POST&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;          connection.setRequestProperty(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Content-Type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;application/x-www-form-urlencoded&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;br /&gt;          connection.setRequestProperty(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Content-Length&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Integer.toString(urlParameters.getBytes().length));&lt;br /&gt;          connection.setRequestProperty(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Content-Language&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;en-US&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;br /&gt;          connection.setUseCaches(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;          connection.setDoInput(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;true&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;          connection.setDoOutput(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;true&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Send request&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            DataOutputStream wr &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DataOutputStream(&lt;br /&gt;                  connection.getOutputStream());&lt;br /&gt;          wr.writeBytes(urlParameters);&lt;br /&gt;          wr.flush();&lt;br /&gt;          wr.close();&lt;br /&gt;&lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Get Response&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            InputStream is &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; connection.getInputStream();&lt;br /&gt;          BufferedReader rd &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; BufferedReader(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; InputStreamReader(is));&lt;br /&gt;          String line;&lt;br /&gt;          StringBuffer response &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; StringBuffer();&lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;while&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ((line &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; rd.readLine()) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) {&lt;br /&gt;              response.append(line);&lt;br /&gt;              response.append(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\r&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;          }&lt;br /&gt;          rd.close();&lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.toString();&lt;br /&gt;&lt;br /&gt;      } &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;catch&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (Exception e) {&lt;br /&gt;&lt;br /&gt;          e.printStackTrace();&lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;br /&gt;      } &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;finally&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; {&lt;br /&gt;&lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (connection &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) {&lt;br /&gt;              connection.disconnect();&lt;br /&gt;          }&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('ae4fdb3c-f5ae-4994-a668-91e8f6ce9040');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;You only need to change "ORGID" with your organization id in the above code. And it will work for your developer/production org.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;This application will be useful for such companies who want their customers to log cases directly from their Android mobiles natively. They can simply setup this application and ask their customers to install the app on their mobiles. And this is ready to use.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;You can download the complete code from here:&lt;br /&gt;&lt;a href="http://www.aslambari.com/downloads/AndroidToCase.zip"&gt;http://www.aslambari.com/downloads/AndroidToCase.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hope you like this app :) .  Give me feedback what do you think.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-7557787605733268696?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/7557787605733268696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/05/android-to-case-android-app-to-log.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/7557787605733268696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/7557787605733268696'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/05/android-to-case-android-app-to-log.html' title='&apos;Android To Case&apos; : Android App to log Salesforce Case'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-iQuK3ePeBD0/Tdeiun72VjI/AAAAAAAABiU/U4OWf_Hnamc/s72-c/Android_to_case.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-6993063221099757746</id><published>2011-05-13T21:06:00.000-07:00</published><updated>2011-05-14T02:22:36.790-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='drag and drop'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='multiselect list'/><title type='text'>Salesforce Drag Drop MultiSelect List Using JQuery</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Recently i came across with one requirement where end user needs a multiselect picklist where he can drag drop items between two list in Salesforce. I searched for some good drag drop scripts over net and finally found best one which fits in my need. It is from thechriswalker.net and you can see that in action &lt;a href="http://thechriswalker.net/2009-02/multiple-drag-and-drop-between-two-lists-with-jquery.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-RWDnQRsQURw/Tc4Fs5qs4jI/AAAAAAAABhw/uWK1eUX0om8/s1600/sf_drag_drop.jpg"&gt;&lt;img style="cursor: pointer; width: 166px; height: 70px;" src="http://4.bp.blogspot.com/-RWDnQRsQURw/Tc4Fs5qs4jI/AAAAAAAABhw/uWK1eUX0om8/s320/sf_drag_drop.jpg" alt="" id="BLOGGER_PHOTO_ID_5606424855075152434" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;So I used that jquery stuff and wrapped that in a re-usable VF component to make it more general. It is very simple to use and easy to embed in you VF page.&lt;br /&gt;In your VF page you simply need to call the VF component as below syntax:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;&amp;lt;c:sfdragdroplist list1="India;United States;France;Germany;Japan" outputfieldid="list_2_serialised"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The above syntax will make two list on screen drag and drop enabled. Source list will have counties given in "list1". This attribute contains the list of items separated by semicolon ";". You can directly hard code these items to component or you can also fetch from any object fields and make that semicolon separated (note: multiselect picklist already contains values as semicolon separated) and pass to component. For storing what user is selecting for your DB or later processing purpose you need to make one extra textfield (or hidden field) and provide that id in above component like "list_2_serialised"&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;&amp;lt;input id="list_2_serialised" name="list_2_serialised" value="{!list2FinalItems}" type="hidden"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-0dsriP0XU-A/Tc4Ggv0bmdI/AAAAAAAABh4/8jkKZsgVeR8/s1600/drag_drop_sample.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 144px;" src="http://2.bp.blogspot.com/-0dsriP0XU-A/Tc4Ggv0bmdI/AAAAAAAABh4/8jkKZsgVeR8/s320/drag_drop_sample.jpg" alt="" id="BLOGGER_PHOTO_ID_5606425745784805842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;You can download the complete code from this package url&lt;br /&gt;&lt;a href="https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t90000000PpxL"&gt;https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t90000000PpxL&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can see the working demo here&lt;br /&gt;&lt;a href="http://labsprojects-developer-edition.ap1.force.com/apex/DemoSFDragDropList"&gt;http://labsprojects-developer-edition.ap1.force.com/apex/DemoSFDragDropList&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The above implementation is for simple list drag drop, one can extend it to make it more advance level to enable drag drop between two different tables or screens.&lt;br /&gt;&lt;br /&gt;Hope this will be helpful for users!!!&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-6993063221099757746?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/6993063221099757746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/05/salesforce-drag-drop-multiselect-list.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/6993063221099757746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/6993063221099757746'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/05/salesforce-drag-drop-multiselect-list.html' title='Salesforce Drag Drop MultiSelect List Using JQuery'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-RWDnQRsQURw/Tc4Fs5qs4jI/AAAAAAAABhw/uWK1eUX0om8/s72-c/sf_drag_drop.jpg' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-2927920870020498084</id><published>2011-05-05T01:52:00.000-07:00</published><updated>2011-05-05T02:06:35.102-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='detail page'/><category scheme='http://www.blogger.com/atom/ns#' term='VF'/><category scheme='http://www.blogger.com/atom/ns#' term='relatedlist'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='related list'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><title type='text'>Making Related List without using Apex Class</title><content type='html'>Hi All,&lt;br /&gt;Here i want to give some sample code to show you how to make RelatedList on your VF page without using any Apex Code. There are two solutions for this problem.&lt;br /&gt;&lt;br /&gt;1) Using &amp;lt;apex:relatedlist&amp;gt;&lt;br /&gt;Suppose you have standard Case object and have one custom child object named "Child__c" to case. Then you can show your relatedlist on vf page using below code.&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDiv3d38ee7b-4c0e-4519-9172-e7a2c10e1ddb" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe3d38ee7b-4c0e-4519-9172-e7a2c10e1ddb" src="http://www.blogtrog.com/code.aspx?id=3d38ee7b-4c0e-4519-9172-e7a2c10e1ddb" style="width: 600px; height: 200px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv3d38ee7b-4c0e-4519-9172-e7a2c10e1ddb" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;standardController&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Case"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:relatedList &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;list&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Childs__r"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('3d38ee7b-4c0e-4519-9172-e7a2c10e1ddb');&lt;/script&gt;&lt;br /&gt;The list will be displayed on your page but it always gives "Action" column also with "Edit | Del" links. If you want to get rid off that then you need to do a little jquery trick to remove that. See the below code.&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDive06ef74b-fef9-41f1-a5bc-185d7b4555d7" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframee06ef74b-fef9-41f1-a5bc-185d7b4555d7" src="http://www.blogtrog.com/code.aspx?id=e06ef74b-fef9-41f1-a5bc-185d7b4555d7" style="width: 600px; height: 300px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDive06ef74b-fef9-41f1-a5bc-185d7b4555d7" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;standardController&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Case"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;src&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;$(document).ready(function(){&lt;br /&gt;$('#Childs a').attr('target','_blank');&lt;br /&gt;});&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;style&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;.pbButton{&lt;br /&gt;display:none;&lt;br /&gt;}&lt;br /&gt;.actionColumn{&lt;br /&gt;display:none;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;style&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Div &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Childs"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:relatedList &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;list&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Childs__r"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Div&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('e06ef74b-fef9-41f1-a5bc-185d7b4555d7');&lt;/script&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The main issue i found using  above approach of making list is that&lt;apex:relatedlist&gt; it depends on fields selected on page layout for that relatedlist. If you have added 2 fields on your layout, your vf will also show two fields. If you remove that related list from layout, then your vf will show only default fields ( name) only. So, in some sitations this solution is not perfect. For that reason, here is another solution.&lt;/apex:relatedlist&gt;&lt;br /&gt;&lt;apex:relatedlist&gt;&lt;/apex:relatedlist&gt;&lt;/div&gt;&lt;apex:relatedlist&gt;&lt;br /&gt;3) Using relations objects iteration and Standard Tags.&lt;br /&gt;Here is the other way to achieve your related list on vf page:&lt;br /&gt;&lt;/apex:relatedlist&gt;&lt;br /&gt;&lt;div id="iframeDiv77bb5b7e-b816-4bf2-9115-4e84b1816c3e" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe77bb5b7e-b816-4bf2-9115-4e84b1816c3e" src="http://www.blogtrog.com/code.aspx?id=77bb5b7e-b816-4bf2-9115-4e84b1816c3e" style="width: 600px; height: 200px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv77bb5b7e-b816-4bf2-9115-4e84b1816c3e" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;standardController&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Case"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:sectionHeader &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;title&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="http://www.aslambari.com"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; subtitle&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Related List Example"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:pageBlock&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:pageBlockTable &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="{!Case.Childs__r}"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; var&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="child"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:column &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;headervalue&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Name"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:outputLink &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="/{!child.id}"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{!child.name}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:outputLink&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:column&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:column &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="{!child.detail__c}"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:column &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="{!child.is_active__c}"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:column &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="{!child.createddate}"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:column &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="{!child.createdbyId}"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:pageBlockTable&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:pageBlock&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('77bb5b7e-b816-4bf2-9115-4e84b1816c3e');&lt;/script&gt;Here is a working demo for above code sample:&lt;br /&gt;http://labsprojects-developer-edition.ap1.force.com/apex/RelatedListSample?id=50090000000sW5q&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above way, you can customize your list as you want.&lt;br /&gt;&lt;br /&gt;Hope It helps developers to find quick solution for related list.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-2927920870020498084?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/2927920870020498084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/05/making-related-list-without-using-apex.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/2927920870020498084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/2927920870020498084'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/05/making-related-list-without-using-apex.html' title='Making Related List without using Apex Class'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-3504455761003957123</id><published>2011-04-23T02:44:00.000-07:00</published><updated>2011-04-23T03:16:23.002-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='date picker'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='date time'/><category scheme='http://www.blogger.com/atom/ns#' term='datepicker'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><category scheme='http://www.blogger.com/atom/ns#' term='year'/><title type='text'>Salesforce Native DatePicker Year Extending Component</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I developed one simple and useful component to extend Native Salesforce DatePicker. You all must aware of that we can't change Year list in datepicker and have to depend of salesforce native year list which is about -1 to +5 of current year. This is not useful on many situation like if i need to make one Date Of Birth field or any other date field where i need years range some high.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-wRKkLNuZrNM/TbKi7IPhEKI/AAAAAAAABgs/t91wML5Ujqg/s1600/datepicker_extend.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 316px;" src="http://2.bp.blogspot.com/-wRKkLNuZrNM/TbKi7IPhEKI/AAAAAAAABgs/t91wML5Ujqg/s320/datepicker_extend.png" alt="" id="BLOGGER_PHOTO_ID_5598716423483494562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;So i came up with simple component solution for this of your VF page. You simply need to include this in your VF page and use as following.&lt;br /&gt;&lt;br /&gt;Sample Usage:&lt;br /&gt;1) By using "lowerLimit" and "higherLimit"&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-style: italic; font-weight: bold;"&gt;&amp;lt;c:datepickerextend lowerlimit="10" higherlimit="15"/&amp;gt;&lt;br /&gt;&lt;/span&gt;It will pick first year available in picker year list , for example 2010, and then add 10 earlier years to top of the picklist.&lt;br /&gt;Same for higherLimit, it will pick last year available in picker year list, for example 2016, and then add 15 later years to bottom of the picklist.&lt;br /&gt;&lt;br /&gt;2) By using "startYear" and "endYear&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-style: italic; font-weight: bold;"&gt;&amp;lt;c:datepickerextend startYear="1982" endYear="2020"/&amp;gt;&lt;br /&gt;&lt;/span&gt;It will simply fill year list from 1982 to 2020.&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-style: italic; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 102, 0);"&gt;Downloads&lt;/span&gt;&lt;br /&gt;----------------------------------------------------&lt;br /&gt;1) Component Code: Download from here&lt;br /&gt;&lt;a href="http://www.aslambari.com/datepick_extend/DatePickerExtend.txt"&gt;http://www.aslambari.com/datepick_extend/DatePickerExtend.txt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2) jQuery Lib: Download from here and save in static resource as datepicker_extend (You can you any jquery lib instead)&lt;br /&gt;&lt;a href="http://www.aslambari.com/datepick_extend/jquery-1.5.2.min.js"&gt;http://www.aslambari.com/datepick_extend/jquery-1.5.2.min.js&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3) Demo Usage Code: Download from here&lt;br /&gt;&lt;a href="http://www.aslambari.com/datepick_extend/DemoUsageCode.txt"&gt;http://www.aslambari.com/datepick_extend/DemoUsageCode.txt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;Working online demo:&lt;/span&gt;&lt;br /&gt;You can view one simple demo, used following code:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-style: italic; font-weight: bold;"&gt;&amp;lt;c:datepickerextend lowerlimit="10" higherlimit="5"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://labsprojects-developer-edition.ap1.force.com/DatePickerExtendDemo"&gt;http://labsprojects-developer-edition.ap1.force.com/DatePickerExtendDemo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Provide your feedback as always. Enjoy !!!&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-3504455761003957123?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/3504455761003957123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/04/salesforce-native-datepicker-year.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/3504455761003957123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/3504455761003957123'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/04/salesforce-native-datepicker-year.html' title='Salesforce Native DatePicker Year Extending Component'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-wRKkLNuZrNM/TbKi7IPhEKI/AAAAAAAABgs/t91wML5Ujqg/s72-c/datepicker_extend.png' height='72' width='72'/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-5693595071132350257</id><published>2011-04-16T13:09:00.000-07:00</published><updated>2011-04-16T13:27:30.750-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><category scheme='http://www.blogger.com/atom/ns#' term='voting'/><category scheme='http://www.blogger.com/atom/ns#' term='Poll'/><category scheme='http://www.blogger.com/atom/ns#' term='polling system'/><category scheme='http://www.blogger.com/atom/ns#' term='SF Ballot'/><title type='text'>SF Ballot : Native Poll System For Salesforce</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Today i came up with one new tool i created "SF Ballot". This is a small application tool used for polling/voting for Salesforce internal users, customer portal users and others with native support. It is easy to setup and integrated with sidebar for users. Users can submit and see result easily for their daily polls. Admin can easily creates new poll daily for users.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-MbQaU1tojAc/Tan30AT0JfI/AAAAAAAABgg/aL1kcnca6Yo/s1600/sf_ballot.gif"&gt;&lt;img style="cursor: pointer; width: 156px; height: 71px;" src="http://4.bp.blogspot.com/-MbQaU1tojAc/Tan30AT0JfI/AAAAAAAABgg/aL1kcnca6Yo/s320/sf_ballot.gif" alt="" id="BLOGGER_PHOTO_ID_5596276484792919538" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt; You can download the package from this url:&lt;br /&gt;&lt;br /&gt;&lt;a style="color: rgb(51, 51, 255); font-weight: bold;" href="https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t90000000DNdg"&gt;https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t90000000DNdg&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is the detailed information about this tool. You can find screencast also there and updated info about the tool.&lt;br /&gt;&lt;br /&gt;&lt;a style="font-weight: bold; color: rgb(0, 0, 153);" href="http://www.aslambari.com/sf_ballot.html"&gt;http://www.aslambari.com/sf_ballot.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Try this out and give me feedback about your experience with this.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-5693595071132350257?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/5693595071132350257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/04/sf-ballot-native-poll-system-for.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/5693595071132350257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/5693595071132350257'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/04/sf-ballot-native-poll-system-for.html' title='SF Ballot : Native Poll System For Salesforce'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-MbQaU1tojAc/Tan30AT0JfI/AAAAAAAABgg/aL1kcnca6Yo/s72-c/sf_ballot.gif' height='72' width='72'/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-6302760332543321195</id><published>2011-04-08T20:53:00.000-07:00</published><updated>2011-04-08T21:44:32.823-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='DupeBlocker'/><category scheme='http://www.blogger.com/atom/ns#' term='Dupe'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce Duplicate'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='Duplicate Detector'/><category scheme='http://www.blogger.com/atom/ns#' term='Records Removal'/><title type='text'>Restrict Duplicate Records In Salesforce [Duplicate Detector]</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;There are many needs in most of the times for business to avoid duplicate records in their systems. For example Companies don't want duplicate Accounts, Contacts or Leads to be inserted into the systems. So i came up here with one solution application called "Duplicate Detector".&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-ZXXg_O6b808/TZ_dU7fsQKI/AAAAAAAABfw/zA_nTb7Rhpk/s1600/duplicate_detector.jpg"&gt;&lt;img style="cursor: pointer; width: 186px; height: 55px;" src="http://1.bp.blogspot.com/-ZXXg_O6b808/TZ_dU7fsQKI/AAAAAAAABfw/zA_nTb7Rhpk/s320/duplicate_detector.jpg" alt="" id="BLOGGER_PHOTO_ID_5593432613855183010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;This is a managed package, easy to install into Salesforce and ready to use. The package is in Beta and it gives you power to Configure following things:-&lt;br /&gt;&lt;br /&gt;1) Custom Error message when duplicate found&lt;br /&gt;2) Stop Duplicate&lt;br /&gt;3) Report Duplicate, it stops the duplicate and also prompts the duplicate found record link records.&lt;br /&gt;4) You can select fields on which you want to make "Duplicate Detector" to find duplicate and stops the insertion/updation.&lt;br /&gt;&lt;br /&gt;I am planning to extend this package to put some more advance features in near future.&lt;br /&gt;&lt;br /&gt;Go Here to download the package:&lt;br /&gt;&lt;a href="http://www.aslambari.com/duplicate_detector.html"&gt;http://www.aslambari.com/duplicate_detector.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Click here to see a small screen cast about the functionality:-&lt;br /&gt;&lt;a href="http://screencast.com/t/N5RmVk2oN90" target="_BLANK"&gt;http://screencast.com/t/N5RmVk2oN90&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here are some screen shot for it:&lt;br /&gt;&lt;br /&gt;1) Main Front Launching Screen:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-Wwdz9fYce2w/TZ_cauDVh6I/AAAAAAAABfQ/xqVi-bLOL4c/s1600/front_screen.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 88px;" src="http://1.bp.blogspot.com/-Wwdz9fYce2w/TZ_cauDVh6I/AAAAAAAABfQ/xqVi-bLOL4c/s320/front_screen.png" alt="" id="BLOGGER_PHOTO_ID_5593431613814179746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;2) Configuration/Criteria Screen:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-8oXigtOiS_A/TZ_cwEGQbdI/AAAAAAAABfY/kth6KxJwgYQ/s1600/Master_Config.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 126px;" src="http://2.bp.blogspot.com/-8oXigtOiS_A/TZ_cwEGQbdI/AAAAAAAABfY/kth6KxJwgYQ/s320/Master_Config.png" alt="" id="BLOGGER_PHOTO_ID_5593431980509261266" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;3) When duplicate record inserted (Account) it reports like below:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-PH_lSVq_4eY/TZ_c9lTp37I/AAAAAAAABfg/0cJ2tNpneoE/s1600/duplicate_screen.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 81px;" src="http://1.bp.blogspot.com/-PH_lSVq_4eY/TZ_c9lTp37I/AAAAAAAABfg/0cJ2tNpneoE/s320/duplicate_screen.png" alt="" id="BLOGGER_PHOTO_ID_5593432212762124210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;It may have some chances to enhance the tool, Try it and let me know your valuable feedbacks and any bug if you find.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-6302760332543321195?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/6302760332543321195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/04/restrict-duplicate-records-in.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/6302760332543321195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/6302760332543321195'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/04/restrict-duplicate-records-in.html' title='Restrict Duplicate Records In Salesforce [Duplicate Detector]'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-ZXXg_O6b808/TZ_dU7fsQKI/AAAAAAAABfw/zA_nTb7Rhpk/s72-c/duplicate_detector.jpg' height='72' width='72'/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-4157316440003822636</id><published>2011-04-02T21:57:00.000-07:00</published><updated>2011-04-02T21:58:31.161-07:00</updated><title type='text'>sfGMap [Salesforce + Google Map + jQuery]</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I came across many times  for implementing Goolge Map on VF page for many clients in different  needs. Every time its a time consuming process like download scripts,  write code to fetch addresses, write code to set markers and additional  javascript for that. So, I decided to make one Simple Component  (Package) which is easy to use and embed in your VF page. Here is a live  demo for the map on VF page which shows all accounts markers and info  in popup.&lt;br /&gt;&lt;br /&gt;&lt;a style="color: rgb(0, 0, 153);" href="https://labsprojects-developer-edition.ap1.force.com/mapdemo"&gt;https://labsprojects-developer-edition.ap1.force.com/mapdemo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is the package link wihch is used to install sfGMap package easily.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a style="color: rgb(0, 0, 153);" href="https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t90000000Po3w"&gt;https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t90000000Po3w&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-YPotE5zdzMw/TZf82adVkMI/AAAAAAAABfI/sBKq8BlzAHM/s1600/sfgmap.png"&gt;&lt;img style="cursor: pointer; width: 200px; height: 100px;" src="http://4.bp.blogspot.com/-YPotE5zdzMw/TZf82adVkMI/AAAAAAAABfI/sBKq8BlzAHM/s320/sfgmap.png" alt="" id="BLOGGER_PHOTO_ID_5591215474149265602" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Here is some guidelines to use &amp;lt;c:sfgmap&amp;gt; the component.&lt;br /&gt;&lt;br /&gt;You simply need to use  component in your vf page with appropriate attributes.&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;--&amp;gt; width:&lt;/span&gt; Width of the map&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;--&amp;gt; height:&lt;/span&gt; Height of the map&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;--&amp;gt; addressmodel :&lt;/span&gt; all addresses need to show on map&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;--&amp;gt; uselatlng :&lt;/span&gt; check to see if use lat lng or address&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;--&amp;gt; zoom :&lt;/span&gt; zoom level for google map&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;--&amp;gt; default :&lt;/span&gt; default address where map will be center on load&lt;br /&gt;&lt;br /&gt;Here is sample use:&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&amp;lt;c:sfgmap width="600" height="400" addressmodel="{!addressmodel}" zoom="4" uselatlng="false"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here  AddressModel is a class which contains the list of Addresses. After  installation of the package you can simply go to "mapdemo" VF page and  "mapdemocontroller" to see the sample code how to use this.&lt;br /&gt;&lt;br /&gt;This package is simple to use and time saving for many. Give it a try :)&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-4157316440003822636?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/4157316440003822636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/04/sfgmap-salesforce-google-map-jquery.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/4157316440003822636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/4157316440003822636'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/04/sfgmap-salesforce-google-map-jquery.html' title='sfGMap [Salesforce + Google Map + jQuery]'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-YPotE5zdzMw/TZf82adVkMI/AAAAAAAABfI/sBKq8BlzAHM/s72-c/sfgmap.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-8059287357823213172</id><published>2011-03-31T10:54:00.000-07:00</published><updated>2011-03-31T11:32:26.762-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='method'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><category scheme='http://www.blogger.com/atom/ns#' term='utility'/><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>Useful Apex Functions Solution "SFApexUtilFunctions"</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Most of time while devleoping Apex Code, we face many business requirements for which we develop our own logic and methods. Most of us written many useful methods so far in their development. So, my idea is simple. I welcome all of you to contribute your common useful apex methods with me and complete my "SFApexUtilFunctions" class. I have started this class with some of my reused methods. If we all contribute our useful methods then i am sure we will have a good library written which will be useful for all of us.&lt;br /&gt;&lt;br /&gt;The format for contributing your methods will be like given as per below with the proper comments on method top describing method and author. You can post in blog itself or mail me. I will inform the newly added methods to all and update the actual class also. One can download the latest version of class from this url:&lt;br /&gt;&lt;br /&gt;&lt;a style="color: rgb(0, 153, 0); font-style: italic;" href="http://www.aslambari.com/SFApexUtilFunctions.cls"&gt;http://www.aslambari.com/SFApexUtilFunctions.cls&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDiv9f9d4ea5-ef93-453d-a5de-011ce03321e8" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe9f9d4ea5-ef93-453d-a5de-011ce03321e8" src="http://www.blogtrog.com/code.aspx?id=9f9d4ea5-ef93-453d-a5de-011ce03321e8" style="width: 600px; height: 600px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv9f9d4ea5-ef93-453d-a5de-011ce03321e8" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;/**&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;@ Name            SFApexUtilFunctions&lt;br /&gt;@ Author          Aslam Bari&lt;br /&gt;@ Created Date    31 March, 2011&lt;br /&gt;@ Description     A utility methods class for helping developers community&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;*/&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; SFApexUtilFunctions{&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;/**&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt; @ Name            join&lt;br /&gt; @ Author          Aslam Bari&lt;br /&gt; @ Created Date    31 March, 2011&lt;br /&gt; @ Desctiption     Join one list of String to a full string&lt;br /&gt; @ Param           List&amp;lt;String&amp;gt;: list of string data&lt;br /&gt; @ Param           separator: the string by which the list is joined&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;*/&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; string join(List&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; lstArg, String separator){&lt;br /&gt;     String fullString &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;     &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;for&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(String item: lstArg){&lt;br /&gt;         fullString &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; item &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; separator;&lt;br /&gt;     }&lt;br /&gt;     &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(fullString.length() &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;         fullString &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; fullString.substring(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, fullString.length() &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;  &lt;br /&gt;     &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; fullString;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;/**&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt; @ Name            getUrlContents&lt;br /&gt; @ Author          Aslam Bari&lt;br /&gt; @ Created Date    31 March, 2011&lt;br /&gt; @ Desctiption     Fetch the contents of remote url&lt;br /&gt; @ Param           url: remote url with all parameters attached to url for GET call&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;*/&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; string getUrlContents(String url){&lt;br /&gt;     HttpRequest request &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; HttpRequest();&lt;br /&gt;     request.setEndPoint(url);&lt;br /&gt;     request.setMethod(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;GET&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;     Http call &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Http();&lt;br /&gt;     HttpResponse response &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; call.send(request);&lt;br /&gt;     &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; response.getBody();&lt;br /&gt; }&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('9f9d4ea5-ef93-453d-a5de-011ce03321e8');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So start now and lets contribute :)&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-8059287357823213172?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/8059287357823213172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/03/useful-apex-functions-solution.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/8059287357823213172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/8059287357823213172'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/03/useful-apex-functions-solution.html' title='Useful Apex Functions Solution &quot;SFApexUtilFunctions&quot;'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-3230324894442852184</id><published>2011-03-25T23:19:00.000-07:00</published><updated>2011-09-16T20:53:33.725-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='TreeView'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><category scheme='http://www.blogger.com/atom/ns#' term='heirarchy'/><category scheme='http://www.blogger.com/atom/ns#' term='SF Tree'/><title type='text'>Simple SF Tree for VF Page</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Many times people need one solution for using Tree structure on thier VF page. There are many solution using JS/JQuery. Here i used jquery treeview plugin and created one apex component which can be used directly in you VF page. You simply need to use following syntax to embed this tree in your VF page:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 102, 0);"&gt;&amp;lt;c:sftree /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-rjMTO8eAEHk/TY2HEEAhycI/AAAAAAAABfA/IRW46TEI9mU/s1600/sftree.png"&gt;&lt;img style="cursor: pointer; width: 254px; height: 314px;" src="http://1.bp.blogspot.com/-rjMTO8eAEHk/TY2HEEAhycI/AAAAAAAABfA/IRW46TEI9mU/s320/sftree.png" alt="" id="BLOGGER_PHOTO_ID_5588271216501836226" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Here is a working demo for this SF Tree.&lt;br /&gt;&lt;a style="color: rgb(51, 153, 153);" href="http://labsprojects-developer-edition.ap1.force.com/sftreedemo"&gt;http://labsprojects-developer-edition.ap1.force.com/sftreedemo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The component provides two JS method on click of parent and child node and send id of the node. You can define those methods in our VF page and do process whatever you need.&lt;br /&gt;&lt;!--&lt;br /&gt;The component works for Account and its Contacts children. But you can simply modify the code to work it for any other objects in Salesforce.&lt;br /&gt;Here is the package link. You can install this package and start using it. The demo page name is "sftreedemo".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t90000000Pnvh"&gt;&lt;/a&gt;&lt;a href="https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t90000000Pnvm"&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t90000000Pnvm&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Mail me  if you face any issue. Hope its helpful for some people.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-3230324894442852184?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/3230324894442852184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/03/simple-sf-tree-for-vf-page.html#comment-form' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/3230324894442852184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/3230324894442852184'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/03/simple-sf-tree-for-vf-page.html' title='Simple SF Tree for VF Page'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-rjMTO8eAEHk/TY2HEEAhycI/AAAAAAAABfA/IRW46TEI9mU/s72-c/sftree.png' height='72' width='72'/><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-597092545234590803</id><published>2011-03-16T10:37:00.000-07:00</published><updated>2011-03-16T10:48:04.755-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Map'/><category scheme='http://www.blogger.com/atom/ns#' term='KeySet'/><category scheme='http://www.blogger.com/atom/ns#' term='VF'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><title type='text'>Using Map In Your VF Pages</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Most of you aware of this but i am sure most of you (like me) un aware about that we can use Map directly on VF pages. Atleast for me, it is a news :) . Anyway, i am going to show you  how to use simple map on your VF page so that you can avoid Model class (If you making only because of thinking that VF does not support Map). Here I am going to show a simple program which counts duplicate accounts by name and shows on VF screen. Here Account Name is "key" of Map and the "value" part is count of duplicate account.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-v9RXhS7CaEk/TYD3W7SOCwI/AAAAAAAABe4/MOPOI2Z9SuI/s1600/2011-03-16_2313.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 122px;" src="http://4.bp.blogspot.com/-v9RXhS7CaEk/TYD3W7SOCwI/AAAAAAAABe4/MOPOI2Z9SuI/s320/2011-03-16_2313.png" alt="" id="BLOGGER_PHOTO_ID_5584735511182707458" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Class Code:&lt;br /&gt;&lt;div id="iframeDivc922d9d7-d7f4-4d05-ae76-9a8d8d7ec989" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframec922d9d7-d7f4-4d05-ae76-9a8d8d7ec989" src="http://www.blogtrog.com/code.aspx?id=c922d9d7-d7f4-4d05-ae76-9a8d8d7ec989" style="width: 600px; height: 300px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDivc922d9d7-d7f4-4d05-ae76-9a8d8d7ec989" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; TestMapController{&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; map&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;string,integer&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; data {get;set;}&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; TestMapController(){&lt;br /&gt;      data &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; map&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;string,integer&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;();&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;for&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(Account acc: [Select Id, Name, (Select Id, Name, Email from Contacts), Phone from Account]){&lt;br /&gt;          integer count &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; data.get(acc.name);&lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(count &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;              count&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;++&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;              count &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;          data.put(acc.name, count);&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('c922d9d7-d7f4-4d05-ae76-9a8d8d7ec989');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;VF Page Code:&lt;br /&gt;&lt;div id="iframeDivd59579bf-de55-453b-9903-6f74f6ea6571" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframed59579bf-de55-453b-9903-6f74f6ea6571" src="http://www.blogtrog.com/code.aspx?id=d59579bf-de55-453b-9903-6f74f6ea6571" style="width: 600px; height: 200px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDivd59579bf-de55-453b-9903-6f74f6ea6571" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;controller&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="TestMapController"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:pageblock &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;title&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Map Usage On VF"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:pageBlockTable &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="{!data}"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; var&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="d"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:column &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;headerValue&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Account Name"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;       {!d}&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:column&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:column &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;headerValue&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Duplicate Count"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;       {!data[d]}&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:column&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:pageBlockTable&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:pageblock&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:page&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('d59579bf-de55-453b-9903-6f74f6ea6571');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hope this will help new developers who struggle to manage and show their data model on pages.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-597092545234590803?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/597092545234590803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/03/using-map-in-your-vf-pages.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/597092545234590803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/597092545234590803'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/03/using-map-in-your-vf-pages.html' title='Using Map In Your VF Pages'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-v9RXhS7CaEk/TYD3W7SOCwI/AAAAAAAABe4/MOPOI2Z9SuI/s72-c/2011-03-16_2313.png' height='72' width='72'/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-7330367398932519794</id><published>2011-03-06T05:19:00.000-08:00</published><updated>2011-03-06T05:49:52.441-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='rounded corner'/><category scheme='http://www.blogger.com/atom/ns#' term='border'/><category scheme='http://www.blogger.com/atom/ns#' term='DD_roundies'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Rounded corner box using easy JS</title><content type='html'>Hi All,&lt;br /&gt;I think most of us many times faced the situation when they need to make some rounded corner boxes (div) on their web page. Generally most of us go for two ways:&lt;br /&gt;1) Use of -moz-border-radius , but this works in Mozilla browsers only not in IE&lt;br /&gt;2) If one want to do that for support all browsers then he needs to achieve that using combination of 3-4 divs , setting some border images which already rounded. It means extra divs in your existing logic. So far i also follow that.&lt;br /&gt;&lt;br /&gt;But recently i found a useful library which make any div available in your webpage to rounded corner with single line of code. So you just need to focus on your web design and just need to call one method to make rounded corner for whichever div you need. The library is &lt;a href="http://dillerdesign.com/experiment/DD_roundies/"&gt;DD_roundies&lt;/a&gt;. This gives same output in all browsers so you no need to take any extra actions. Here is the sample code and working demo i used.&lt;br /&gt;&lt;br /&gt;The single line of code which you need to call is:&lt;br /&gt;&lt;span style="font-family: monospace; font-style: italic; color: rgb(0, 102, 0);"&gt;DD_roundies.addRule('#yet_another', '10px', true);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here "#yet_another" is the id for the div which you need to make round, '10px' is the radius for border for roundness, and 'true' is a flag for support all browser.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Complete Code:&lt;/span&gt;&lt;br /&gt;&lt;div id="iframeDiv42a04ce6-d5aa-4e2b-8904-65a91501467a" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe42a04ce6-d5aa-4e2b-8904-65a91501467a" src="http://www.blogtrog.com/code.aspx?id=42a04ce6-d5aa-4e2b-8904-65a91501467a" style="width: 600px; height: 400px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv42a04ce6-d5aa-4e2b-8904-65a91501467a" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;&amp;lt;style&amp;gt;&lt;br /&gt;#yet_another&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;  border&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;1px solid #000&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;  background-color&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#ccc&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;  padding&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;5px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;  height&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;100px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;  width&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;400px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;  text-align&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;center&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;&lt;br /&gt;#up_another&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;  border&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;1px solid #000&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;  background-color&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#ccc&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;  padding&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;5px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;  height&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;100px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;  width&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;400px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;;&lt;br /&gt;  text-align&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;center&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;#capsule_round &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;width&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;100px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; height&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;100px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; background&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#FA0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;padding&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;10px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;text-align&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;center&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;padding-top&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;100px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;&lt;br /&gt;#totally_round &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;width&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;100px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; height&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;100px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; background&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#FA0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;padding&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;10px&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;text-align&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;center&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;script src="DD_roundies_0.0.2a-min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;/*&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; EXAMPLES &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;*/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;/*&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; varying radii, "all" browsers &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;*/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;&lt;br /&gt;DD_roundies.addRule('#yet_another', '10px', true);&lt;br /&gt;DD_roundies.addRule('#up_another', '10px 10px 0px 0px', true);&lt;br /&gt;DD_roundies.addRule('#capsule_round', '10000px', true);&lt;br /&gt;DD_roundies.addRule('#totally_round', '10000px', true);&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id="yet_another"&amp;gt;&lt;br /&gt;Rounding box with 10px radius&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;br/&amp;gt;&lt;br /&gt;&amp;lt;br/&amp;gt;&lt;br /&gt;&amp;lt;div id="up_another"&amp;gt;&lt;br /&gt;Rounding box with upper round 10px radius&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;br/&amp;gt;&lt;br /&gt;&amp;lt;br/&amp;gt;&lt;br /&gt;&amp;lt;div id="capsule_round"&amp;gt;&lt;br /&gt;Capsule Round&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;br/&amp;gt;&lt;br /&gt;&amp;lt;br/&amp;gt;&lt;br /&gt;&amp;lt;div id="totally_round"&amp;gt;&lt;br /&gt;Total Round&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('42a04ce6-d5aa-4e2b-8904-65a91501467a');&lt;/script&gt;&lt;br /&gt;Here is the link for working demo. You can check it in Firefox as well as in IE.&lt;br /&gt;&lt;a href="https://labsprojects-developer-edition.ap1.force.com/RoundCorners"&gt;https://labsprojects-developer-edition.ap1.force.com/RoundCorners&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hope it will be useful for somebody who searching for that support :)&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-7330367398932519794?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/7330367398932519794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/03/rounded-corner-box-using-easy-js.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/7330367398932519794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/7330367398932519794'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/03/rounded-corner-box-using-easy-js.html' title='Rounded corner box using easy JS'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-8293747806534975916</id><published>2011-02-26T04:19:00.000-08:00</published><updated>2011-02-26T04:33:25.732-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='Talend'/><category scheme='http://www.blogger.com/atom/ns#' term='Import'/><category scheme='http://www.blogger.com/atom/ns#' term='tMap'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='VLookup'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Loading'/><title type='text'>Salesforce, Talend (tMap), Data Loading...Avoid VLookup</title><content type='html'>Hi All,&lt;br /&gt;Today I will give you some demonstration about data loading with Talend. I am taking one special case in which generally people use VLookup function from excel to match the lookup ids and fill the records csv column and then upload. For example, you have one CSV file for Contacts which you want to insert into salesforce, that CSV contains 'Account Name'. But you need AccountId to successfully insert contact records. For solving this people generally do this approach.&lt;br /&gt;&lt;br /&gt;1) Fetch all account names and ids from salesforce and make one csv&lt;br /&gt;2) Use the VLookup function to match Account Name from csv2 to CSV1 and set the extra column in CSV1 for AccountId (generally people struggle here :) )&lt;br /&gt;3) Then use final CSV1 to upload the data&lt;br /&gt;&lt;br /&gt;So, I am here to tell you easy upload approach using Talend tMAP to avoid any VLookup headache and simply upload data successfully.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-xQx-PFGMkEY/TWjwjEkHrJI/AAAAAAAABeo/ZScgBDRaBA0/s1600/complete_UI.png"&gt;&lt;img style="cursor: pointer; width: 542px; height: 280px;" src="http://2.bp.blogspot.com/-xQx-PFGMkEY/TWjwjEkHrJI/AAAAAAAABeo/ZScgBDRaBA0/s320/complete_UI.png" alt="" id="BLOGGER_PHOTO_ID_5577972623809686674" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Follow this approach.&lt;br /&gt;1) Create a new Job&lt;br /&gt;2) Select File-&gt;tFileInputDelimited and set your CSV input file here&lt;br /&gt;3) Select Business-&gt;Salesforce-&gt;tSalesforceOutputBulkExec, set your salesforce credentials where you want to upload the data&lt;br /&gt;4) Select Business-&gt;Salesforce-&gt;tSalesforceInput, set your salesforce credentials from where you want to fetch the Account Ids and Account Names data, Set your query here&lt;br /&gt;5) Select Processing-&gt;tMap, this is the heart of whole process&lt;br /&gt;6) Double click on tMap, set the mapping here, CSV1-&gt;AccountName TO tSalesforceInput-&gt;Name. Drag relavent columns to your salesforce output file, Set the ID from tSalesforceInput to tSalesforceOutputBulkExec-&gt;AccountId&lt;br /&gt;7) Now save your complete Job&lt;br /&gt;8) Run the job and it will give you output as results.&lt;br /&gt;&lt;br /&gt;Here is the Screencast to see complete process as vedio.&lt;br /&gt;&lt;a href="http://screencast.com/t/J8tUcer963u4"&gt;http://screencast.com/t/J8tUcer963u4&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here are more links which can help you to run and use Talend&lt;br /&gt;&lt;a href="http://techblog.appirio.com/2009/08/using-talend-to-export-data-from.html"&gt;http://techblog.appirio.com/2009/08/using-talend-to-export-data-from.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://techblog.appirio.com/search/label/Talend"&gt;http://techblog.appirio.com/search/label/Talend&lt;/a&gt;&lt;br /&gt;&lt;a href="http://techblog.appirio.com/2011/01/loading-data-to-salesforcecom-with-bulk.html"&gt;http://techblog.appirio.com/2011/01/loading-data-to-salesforcecom-with-bulk.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://techblog.appirio.com/2009/12/performing-lookups-and-transformations.html"&gt;http://techblog.appirio.com/2009/12/performing-lookups-and-transformations.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hopefully this will help some people to try Talend and finding its benifits.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-8293747806534975916?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/8293747806534975916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/02/salesforce-talend-tmap-data.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/8293747806534975916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/8293747806534975916'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/02/salesforce-talend-tmap-data.html' title='Salesforce, Talend (tMap), Data Loading...Avoid VLookup'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-xQx-PFGMkEY/TWjwjEkHrJI/AAAAAAAABeo/ZScgBDRaBA0/s72-c/complete_UI.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-1492946632369016876</id><published>2011-02-16T06:35:00.000-08:00</published><updated>2011-02-16T07:33:17.811-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PDF'/><category scheme='http://www.blogger.com/atom/ns#' term='Barcode'/><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='VF'/><category scheme='http://www.blogger.com/atom/ns#' term='bar code'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Force'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><title type='text'>Barcode, Salesforce and PDF</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Recently I faced one issue where i need to generate Barcode on the fly in VF and also render that as PDF. I searched on Net and community, found some people have done Barcode generation using Javascript. But in my case i need to render it as PDF and VF does not  support Javascript when renderAs PDF.  So i decided to go the way to generate Barcode image. The first thing came in my mind is PHP/GD way to generate Barcode image and use that url in VF to show image.  Then i found &lt;a href="http://www.sid6581.net/cs/php-scripts/barcode/"&gt;this site&lt;/a&gt; useful and very useful PHP script which fits my need&lt;br /&gt;&lt;/div&gt;&lt;a href="http://www.sid6581.net/cs/php-scripts/barcode/"&gt;http://www.sid6581.net/cs/php-scripts/barcode/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I used this script, done some modification in this and hosted on my site And used in my VF page as below:-&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDiv0ecfc5bc-9087-42ad-ae97-fc42acf79344" style="display: none; margin: 0px;"&gt;&lt;iframe id="iframe0ecfc5bc-9087-42ad-ae97-fc42acf79344" src="http://www.blogtrog.com/code.aspx?id=0ecfc5bc-9087-42ad-ae97-fc42acf79344" style="width: 600px; height: 100px; border: 1px solid rgb(224, 224, 224); margin: 0px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv0ecfc5bc-9087-42ad-ae97-fc42acf79344" style="display: block; margin: 0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;apex:image &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="http://www.aslambari.com/barcode.php?barcode=CS1001&amp;amp;width=200&amp;amp;text=1&amp;amp;height=100"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('0ecfc5bc-9087-42ad-ae97-fc42acf79344');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Here is some details about how you use the url and parameters to generate barcode:&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;URL&lt;/span&gt;: http://www.aslambari.com/barcode.php&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;Params&lt;/span&gt;:&lt;br /&gt;            &lt;span style="color: rgb(51, 51, 255);"&gt;barcode&lt;/span&gt;: [any text to render as barcode]&lt;br /&gt;            &lt;span style="color: rgb(51, 51, 255);"&gt;text&lt;/span&gt;: [0 or 1]&lt;br /&gt;            &lt;span style="color: rgb(51, 51, 255);"&gt;format&lt;/span&gt;: [jpeg/png/gif]&lt;br /&gt;            &lt;span style="color: rgb(51, 51, 255);"&gt;width&lt;/span&gt;: [the width you want]&lt;br /&gt;            &lt;span style="color: rgb(51, 51, 255);"&gt;height&lt;/span&gt;: [the height you want]&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-IkR6UwJfwIA/TVvtUfGgjgI/AAAAAAAABeg/L5VheXU6Qio/s1600/barcode.php.png"&gt;&lt;img style="cursor: pointer; width: 300px; height: 80px;" src="http://3.bp.blogspot.com/-IkR6UwJfwIA/TVvtUfGgjgI/AAAAAAAABeg/L5VheXU6Qio/s320/barcode.php.png" alt="" id="BLOGGER_PHOTO_ID_5574309900003085826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;It works great if my VF render as normal HTML page, but as soon as i make it renderAs="PDF", VF again not works, it does not allow dynamic generated images. So again i got disappointed.&lt;br /&gt;Then i thought again and did apex code to fetch the dynamic binary data generated my PHP site url and save it into attachment and use that url in my VF page. I was thinking this time i will win for sure, but again it did not work. HttpResponse does not allow Blob response, it always gives response as String and that mingled my image data. Disappointed again.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Then finally i have decided to create dynamic generated barcode on PHP and save as temprary images and use that url in my img tag and renderAs="PDF", this time i got success :)&lt;br /&gt;&lt;br /&gt;Here is the working demo for my work:-&lt;br /&gt;&lt;a href="https://labsprojects-developer-edition.ap1.force.com/BarCodeSample"&gt;https://labsprojects-developer-edition.ap1.force.com/BarCodeSample&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you need complete code for above demo site,  here is the &lt;a href="http://www.aslambari.com/SF_Barcode.zip"&gt;link&lt;/a&gt;:&lt;br /&gt;&lt;a href="http://www.aslambari.com/SF_Barcode.zip"&gt;http://www.aslambari.com/SF_Barcode.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enjoy barcoding :)&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-1492946632369016876?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/1492946632369016876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/02/barcode-salesforce-and-pdf.html#comment-form' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/1492946632369016876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/1492946632369016876'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/02/barcode-salesforce-and-pdf.html' title='Barcode, Salesforce and PDF'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-IkR6UwJfwIA/TVvtUfGgjgI/AAAAAAAABeg/L5VheXU6Qio/s72-c/barcode.php.png' height='72' width='72'/><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-4958067407046071450</id><published>2011-02-01T03:56:00.000-08:00</published><updated>2011-02-01T06:52:34.682-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='plug-in'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='apexdoc'/><category scheme='http://www.blogger.com/atom/ns#' term='javadoc'/><category scheme='http://www.blogger.com/atom/ns#' term='force.com'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><title type='text'>ApexDoc Eclipse Plugin For Force.com IDE</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I am very happy to announce that now &lt;a href="http://techsahre.blogspot.com/2011/01/apexdoc-salesforce-code-documentation.html"&gt;ApexDoc&lt;/a&gt; is available as Native "&lt;leo_highlight style="border-bottom: 2px solid rgb(255, 255, 150); background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_0" onclick="leoHighlightsHandleClick('leoHighlights_Underline_0')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_0')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_0')" leohighlights_keywords="eclipse" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_underline="true"&gt;Eclipse&lt;/leo_highlight&gt; Plugin". So no more need to go command line and provide parameters. You can simply go to your Force.IDE, select your classes folder, right click on that and Generate your &lt;a href="http://techsahre.blogspot.com/2011/01/apexdoc-salesforce-code-documentation.html"&gt;ApexDoc&lt;/a&gt;, all in one place. Isn't it cool :)&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_IGUMdDVFXNs/TUf6eOIrdRI/AAAAAAAABeE/saN4JHNFeqY/s1600/apex_doc_plugin_logo.png"&gt;&lt;img style="cursor: pointer; width: 160px; height: 80px;" src="http://1.bp.blogspot.com/_IGUMdDVFXNs/TUf6eOIrdRI/AAAAAAAABeE/saN4JHNFeqY/s320/apex_doc_plugin_logo.png" alt="" id="BLOGGER_PHOTO_ID_5568694861364426002" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;Ok, so here is the guidelines, how to install the plugin and use it.&lt;br /&gt;&lt;br /&gt;1) Go to &lt;a href="http://www.aslambari.com/apexdocplugin.html"&gt;http://www.aslambari.com/apexdocplugin.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2) Download the plugin from there. It will give you one plugins.zip file. Unzip that file.&lt;br /&gt;&lt;br /&gt;3) You will get one "com.apex.doc_1.0.0.jar" file. Copy this file.&lt;br /&gt;&lt;br /&gt;4) Go to your &lt;leo_highlight style="border-bottom: 2px solid rgb(255, 255, 150); background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_1" onclick="leoHighlightsHandleClick('leoHighlights_Underline_1')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_1')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_1')" leohighlights_keywords="eclipse" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_underline="true"&gt;eclipse&lt;/leo_highlight&gt; installation directory and find your plugins folder there, For example D:\&lt;leo_highlight style="border-bottom: 2px solid rgb(255, 255, 150); background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_2" onclick="leoHighlightsHandleClick('leoHighlights_Underline_2')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_2')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_2')" leohighlights_keywords="eclipse" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_underline="true"&gt;Eclipse&lt;/leo_highlight&gt;\plugins&lt;br /&gt;&lt;br /&gt;5) Paster the copied jar file into this directory.&lt;br /&gt;&lt;br /&gt;6) Now restart (if eclispe is already running) your &lt;leo_highlight style="background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_3" onclick="leoHighlightsHandleClick('leoHighlights_Underline_3')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_3')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_3')" leohighlights_keywords="eclipse" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_underline="true"&gt;eclipse&lt;/leo_highlight&gt;&lt;br /&gt;&lt;br /&gt;7) Now go to any Force.com Project you have setup in your &lt;leo_highlight style="background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_4" onclick="leoHighlightsHandleClick('leoHighlights_Underline_4')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_4')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_4')" leohighlights_keywords="eclipse" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_underline="true"&gt;eclipse&lt;/leo_highlight&gt;. Open the classes folder.&lt;br /&gt;&lt;br /&gt;8) Right click on that folder, from shortcut menu select "Force.com", a sub menu will appear, you can see "Generate ApexDoc..." menu item in your submenu.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_IGUMdDVFXNs/TUgUAqzI-SI/AAAAAAAABeM/qiBoGVnuzg8/s1600/apex_doc_plugin_menu.jpg"&gt;&lt;img style="cursor: pointer; width: 287px; height: 320px;" src="http://1.bp.blogspot.com/_IGUMdDVFXNs/TUgUAqzI-SI/AAAAAAAABeM/qiBoGVnuzg8/s320/apex_doc_plugin_menu.jpg" alt="" id="BLOGGER_PHOTO_ID_5568722940964960546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;9) Now click on "Generate ApexDoc...". One ApexDoc dialog box will open.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_IGUMdDVFXNs/TUgUKEgyBXI/AAAAAAAABeU/fjJfJhK5TLQ/s1600/apex_doc_plugin_dialog.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 209px;" src="http://1.bp.blogspot.com/_IGUMdDVFXNs/TUgUKEgyBXI/AAAAAAAABeU/fjJfJhK5TLQ/s320/apex_doc_plugin_dialog.jpg" alt="" id="BLOGGER_PHOTO_ID_5568723102486103410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;10) All options here are self explanatory. The "Source Directory" is already filled up your selection. The "&lt;leo_highlight style="background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_5" onclick="leoHighlightsHandleClick('leoHighlights_Underline_5')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_5')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_5')" leohighlights_keywords="target" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Dtarget%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Dtarget%26domain%3Dwww.blogger.com" leohighlights_underline="false"&gt;Target&lt;/leo_highlight&gt; Directory" is where you want to generate output Documentation generated. "Home HTML File" is your sample home file for index page. "Author File" is for header areas for documentation.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11) Select appropriate options and Click on "Generate" button. It will generate documentation on your selected &lt;leo_highlight style="background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_6" onclick="leoHighlightsHandleClick('leoHighlights_Underline_6')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_6')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_6')" leohighlights_keywords="target" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Dtarget%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Dtarget%26domain%3Dwww.blogger.com" leohighlights_underline="false"&gt;target&lt;/leo_highlight&gt; directory and you will be prompted one message dialog that says "DONE"&lt;br /&gt;&lt;br /&gt;12) If there is any issue, not generated your documentation, you can find one log file generated in your &lt;leo_highlight style="background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_7" onclick="leoHighlightsHandleClick('leoHighlights_Underline_7')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_7')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_7')" leohighlights_keywords="eclipse" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_underline="false"&gt;eclipse&lt;/leo_highlight&gt; installation with name "apex_doc_log.txt".&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;So, this is very useful for Force.com developers and non programmers to use this plugin &lt;leo_highlight style="background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_8" onclick="leoHighlightsHandleClick('leoHighlights_Underline_8')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_8')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_8')" leohighlights_keywords="tool" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Dtool%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Dtool%26domain%3Dwww.blogger.com" leohighlights_underline="false"&gt;tool&lt;/leo_highlight&gt;. You can also check one screenshot here: &lt;a href="http://www.aslambari.com/apexdocplugin.html"&gt;http://www.aslambari.com/apexdocplugin.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For learning how comments syntax will be in your code refer my previous blog:&lt;br /&gt;&lt;a href="http://techsahre.blogspot.com/2011/01/apexdoc-salesforce-code-documentation.html"&gt;http://techsahre.blogspot.com/2011/01/apexdoc-salesforce-code-documentation.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The plugin is in pre-mature stage and may contains bugs. Feel free to report me all bugs or enhancement you find, on my email. I will try to fix those.&lt;br /&gt;&lt;br /&gt;So enjoy documenting :)&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;br /&gt;&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;span id="leoHighlights_iframe_modal_span_container"&gt;&lt;div id="leoHighlights_iframe_modal_div_container" style="position: absolute; visibility: hidden; display: none; width: 520px; height: 391px; z-index: 2147483647;" onmouseover="leoHighlightsHandleIFrameMouseOver();" onmouseout="leoHighlightsHandleIFrameMouseOut();"&gt;        &lt;!-- Top iFrame --&gt;    &lt;iframe id="leoHighlights_top_iframe" name="leoHighlights_top_iframe" title="leoHighlights_top_iframe" src="about:blank" vspace="0" hspace="0" marginwidth="0" marginheight="0" allowtransparency="true" style="position: absolute; top: 0px; left: 0px; width: 520px; height: 294px; z-index: 2147483647;" width="520" frameborder="0" height="294" scrolling="no"&gt;    &lt;/iframe&gt;        &lt;!-- Bottom iFrame --&gt;    &lt;iframe id="leoHighlights_bottom_iframe" name="leoHighlights_bottom_iframe" title="leoHighlights_bottom_iframe" src="about:blank" vspace="0" hspace="0" marginwidth="0" marginheight="0" allowtransparency="true" style="position: absolute; top: 294px; left: 96px; z-index: 2147483647;" width="" frameborder="0" height="" scrolling="no"&gt;    &lt;/iframe&gt; &lt;/div&gt;  &lt;script defer="defer" type="text/javascript"&gt;    var LEO_HIGHLIGHTS_INFINITE_LOOP_COUNT =              300;    var LEO_HIGHLIGHTS_MAX_HIGHLIGHTS =                   50;    var LEO_HIGHLIGHTS_IFRAME_TOP_ID =                    "leoHighlights_top_iframe";    var LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID =                 "leoHighlights_bottom_iframe";    var LEO_HIGHLIGHTS_IFRAME_DIV_ID =                    "leoHighlights_iframe_modal_div_container";           var LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_WIDTH =     520;    var LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_HEIGHT =    391;        var LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_WIDTH =      520;    var LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_HEIGHT =     665;        var LEO_HIGHLIGHTS_IFRAME_TOP_POS_X =                 0;    var LEO_HIGHLIGHTS_IFRAME_TOP_POS_Y =                 0;    var LEO_HIGHLIGHTS_IFRAME_TOP_WIDTH =                 520;    var LEO_HIGHLIGHTS_IFRAME_TOP_HEIGHT =                294;        var LEO_HIGHLIGHTS_IFRAME_BOTTOM_POS_X =              96;    var LEO_HIGHLIGHTS_IFRAME_BOTTOM_POS_Y =              294;    var LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_WIDTH =    425;    var LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_HEIGHT =   97;    var LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_WIDTH =     425;    var LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_HEIGHT =    371;              var LEO_HIGHLIGHTS_SHOW_DELAY_MS =                    300;    var LEO_HIGHLIGHTS_HIDE_DELAY_MS =                    750;    var LEO_HIGHLIGHTS_SHOW_DELAY_NO_UNDER_MS =           850;        var LEO_HIGHLIGHTS_BACKGROUND_STYLE_DEFAULT =         "transparent none repeat scroll 0% 0%";    var LEO_HIGHLIGHTS_BACKGROUND_STYLE_HOVER =           "rgb(245, 245, 0) none repeat scroll 0% 0%";    var LEO_HIGHLIGHTS_ROVER_TAG =                        "711-36858-13496-14";     createInlineScriptElement("var%20LEO_HIGHLIGHTS_DEBUG%20%3D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20false%3B%0Avar%20LEO_HIGHLIGHTS_DEBUG_POS%20%3D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20false%3B%0A%20%20%20%0Avar%20_leoHighlightsPrevElem%20%3D%20null%3B%0Avar%20_leoHighlightsSnoozed%20%3D%20false%3B%0A%0A/**%0A%20*%20Checks%20if%20the%20passed%20in%20class%20exists%0A%20*%20@param%20c%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsClassExists%28c%29%20%7B%0A%20%20%20return%20typeof%28c%29%20%3D%3D%20%22function%22%20%26%26%20typeof%28c.prototype%29%20%3D%3D%20%22object%22%20?%20true%20%3A%20false%3B%0A%7D%0A%0A/**%0A%20*%20Checks%20if%20the%20firebug%20console%20is%20available%0A%20*%20@param%20c%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsFirebugConsoleAvailable%28c%29%20%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsClassExists%28_FirebugConsole%29%20%26%26%20%0A%20%20%20%20%20%20%20%20%20window.console%20%26%26%20console.log%20%26%26%20%0A%20%20%20%20%20%20%20%20%20%28console%20instanceof%20_FirebugConsole%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%7D%0A%20%20%20catch%28e%29%7B%7D%0A%20%20%20%0A%20%20%20return%20false%3B%0A%7D%20%0A%0A%0A/**%0A%20*%20General%20method%20used%20to%20debug%20exceptions%0A%20*%20%0A%20*%20@param%20location%0A%20*%20@param%20e%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsReportExeception%28location%2Ce%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsFirebugConsoleAvailable%28%29%20||LEO_HIGHLIGHTS_DEBUG%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20var%20logString%3Dlocation%2B%22%3A%20%22%2Be%2B%22%5Cn%5Ct%22%2Be.name%2B%22%5Cn%5Ct%22%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28e.number%260xFFFF%29%2B%22%5Cn%5Ct%22%2Be.description%3B%0A%20%20%20%20%20%20%20%20%20if%28_leoHighlightsFirebugConsoleAvailable%28%29%29%0A%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20console.error%28logString%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20console.trace%28%29%3B%0A%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28LEO_HIGHLIGHTS_DEBUG%29%0A%20%20%20%20%20%20%20%20%20alert%28logString%29%3B%20%20%20%20%20%20%0A%20%20%20%7D%0A%20%20%20catch%28e%29%7B%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20log%20a%20string%20to%20the%20firebug%20console%0A%20*%20%0A%20*%20@param%20str%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsDebugLog%28str%29%0A%7B%20%20%20%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsFirebugConsoleAvailable%28%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20console.log%28typeof%28_FirebugConsole%29%2B%22%20%22%2Bstr%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22_leoHighlightsDebugLog%28%29%20%22%2Bstr%2Ce%29%3B%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20get%20an%20attribute%20and%20decode%20it.%0A%20*%20%0A%20*%20@param%20elem%0A%20*%20@param%20id%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsGetAttrib%28elem%2Cid%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20var%20val%3Delem.getAttribute%28id%29%3B%0A%20%20%20%20%20%20return%20decodeURI%28val%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22_leoHighlightsGetAttrib%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%20%7D%0A%20%20%20return%20null%3B%0A%7D%0A%0A/**%0A%20*%20Checks%20if%20this%20is%20within%20a%20frame%20by%20checking%20for%20a%20parent.%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsIsFrame%28%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%20%20%0A%20%20%20%20%20%20return%20%28window%21%3Dtop%29%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22_leoHighlightsIsFrame%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%20%20%0A%20%20%20return%20false%3B%0A%7D%0A%0A/**%0A%20*%20This%20is%20a%20dimensions%20object%0A%20*%20%0A%20*%20@param%20width%0A%20*%20@param%20height%0A%20*%20@return%0A%20*/%0Afunction%20LeoHighlightsDimension%28width%2Cheight%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09this.width%3Dwidth%3B%0A%20%20%20%09this.height%3Dheight%3B%0A%20%20%20%09this.toString%3Dfunction%28%29%20%7B%20return%20%28%22%28%22%2Bthis.width%2B%22%2C%22%2Bthis.height%2B%22%29%22%29%3B%7D%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22new%20LeoHighlightsDimension%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A%20*%20This%20is%20a%20Position%20object%0A%20*%20%0A%20*%20@param%20x%0A%20*%20@param%20y%0A%20*%20@return%0A%20*/%0Afunction%20LeoHighlightsPosition%28x%2Cy%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09this.x%3Dx%3B%0A%20%20%20%09this.y%3Dy%3B%0A%20%20%20%09this.toString%3Dfunction%28%29%20%7B%20return%20%28%22%28%22%2Bthis.x%2B%22%2C%22%2Bthis.y%2B%22%29%22%29%3B%7D%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22new%20LeoHighlightsPosition%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0Avar%20LEO_HIGHLIGHTS_ADJUSTMENT%20%3D%20new%20LeoHighlightsPosition%283%2C3%29%3B%0Avar%20LEO_HIGHLIGHTS_IFRAME_TOP_SIZE%20%3D%20new%20LeoHighlightsDimension%28LEO_HIGHLIGHTS_IFRAME_TOP_WIDTH%2CLEO_HIGHLIGHTS_IFRAME_TOP_HEIGHT%29%3B%0Avar%20LEO_HIGHLIGHTS_IFRAME_BOTTOM_HOVER_SIZE%20%3D%20new%20LeoHighlightsDimension%28LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_WIDTH%2CLEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_HEIGHT%29%3B%0Avar%20LEO_HIGHLIGHTS_IFRAME_BOTTOM_CLICK_SIZE%20%3D%20new%20LeoHighlightsDimension%28LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_WIDTH%2CLEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_HEIGHT%29%3B%0A%0Avar%20LEO_HIGHLIGHTS_DIV_HOVER_SIZE%20%3D%20new%20LeoHighlightsDimension%28LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_WIDTH%2CLEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_HEIGHT%29%3B%0Avar%20LEO_HIGHLIGHTS_DIV_CLICK_SIZE%20%3D%20new%20LeoHighlightsDimension%28LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_WIDTH%2CLEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_HEIGHT%29%3B%0A%0A%0A/**%0A%20*%20Sets%20the%20size%20of%20the%20passed%20in%20element%0A%20*%20%0A%20*%20@param%20elem%0A%20*%20@param%20dim%20%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsSetSize%28elem%2Cdim%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09//%20Set%20the%20popup%20location%0A%20%20%20%09elem.style.width%20%3D%20dim.width%20%2B%20%22px%22%3B%0A%20%20%20%09if%28elem.width%29%0A%20%20%20%09%09elem.width%3Ddim.width%3B%0A%20%20%20%09elem.style.height%20%20%3D%20dim.height%20%2B%20%22px%22%3B%0A%20%20%20%09if%28elem.height%29%0A%20%20%20%09%09elem.height%3Ddim.height%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsSetSize%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A%20*%20This%20can%20be%20used%20for%20a%20simple%20one%20argument%20callback%0A%20*%0A%20*%20@param%20callName%0A%20*%20@param%20argName%0A%20*%20@param%20argVal%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsSimpleGwCallBack%28callName%2CargName%2C%20argVal%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20if%28argName%29%0A%20%20%20%20%20%20%09gwObj.addParam%28argName%2CargVal%29%3B%0A%20%20%20%20%20%20gwObj.callName%28callName%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsSimpleGwCallBack%28%29%20%22%2BcallName%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20gets%20a%20url%20argument%20from%20the%20current%20document.%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsGetUrlArg%28url%2C%20name%20%29%0A%7B%0A%09%20%20name%20%3D%20name.replace%28/[%5C[]/%2C%22%5C%5C%5C[%22%29.replace%28/[%5C]]/%2C%22%5C%5C%5C]%22%29%3B%0A%09%20%20var%20regexS%20%3D%20%22[%5C%5C?%26]%22%2Bname%2B%22%3D%28[^%26%23]*%29%22%3B%0A%09%20%20var%20regex%20%3D%20new%20RegExp%28%20regexS%20%29%3B%0A%09%20%20var%20results%20%3D%20regex.exec%28url%29%3B%0A%09%20%20if%28%20results%20%3D%3D%20null%20%29%0A%09%20%20%20%20return%20%22%22%3B%0A%09%20%20else%0A%09%20%20%20%20return%20results[1]%3B%0A%7D%0A%0A%0A/**%0A%20*%20This%20allows%20to%20redirect%20the%20top%20window%20to%20the%20passed%20in%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsRedirectTop%28url%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%20%20%09%0A%20%20%20%09top.location%3Durl%3B%09%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsRedirectTop%28%29%22%2Ce%29%3B%0A%20%20%20%7D%0A%7D%0A%0A%0A/**%0A%20*%20This%20will%20find%20an%20element%20by%20Id%0A%20*%20%0A%20*%20@param%20elemId%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsFindElementById%28elemId%2Cdoc%29%0A%7B%0A%09try%0A%09%7B%0A%09%20%20%20if%28doc%3D%3Dnull%29%0A%09%20%20%20%20%20%20doc%3Ddocument%3B%0A%09%20%20%20%0A%09%09var%20elem%3Ddoc.getElementById%28elemId%29%3B%0A%09%09if%28elem%29%0A%09%09%09return%20elem%3B%0A%09%09%0A%09%09/*%20This%20is%20the%20handling%20for%20IE%20*/%0A%09%09if%28doc.all%29%0A%09%09%7B%0A%09%09%09elem%3Ddoc.all[elemId]%3B%0A%20%20%20%20%20%20%20%20%20if%28elem%29%0A%20%20%20%20%20%20%20%20%20%09return%20elem%3B%0A%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20for%20%28%20var%20i%20%3D%20%28document.all.length-1%29%3B%20i%20%3E%3D%200%3B%20i--%29%20%7B%0A%20%20%20%20%20%20%20%20%20%09elem%3Ddoc.all[i]%3B%0A%20%20%20%20%20%20%20%20%20%09if%28elem.id%3D%3DelemId%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20elem%3B%0A%20%20%20%20%20%20%20%20%20%7D%0A%09%09%7D%0A%09%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsFindElementById%28%29%22%2Ce%29%3B%0A%20%20%20%7D%0A%09return%20null%3B%0A%7D%0A%0A/**%0A%20*%20Get%20the%20location%20of%20one%20element%20relative%20to%20a%20parent%20reference%0A%20*%0A%20*%20@param%20ref%0A%20*%20%20%20%20%20%20%20%20%20%20%20the%20reference%20element%2C%20this%20must%20be%20a%20parent%20of%20the%20passed%20in%0A%20*%20%20%20%20%20%20%20%20%20%20%20element%0A%20*%20@param%20elem%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsGetLocation%28ref%2C%20elem%29%20%7B%0A%20%20%20_leoHighlightsDebugLog%28%22_leoHighlightsGetLocation%20%22%2Belem.id%29%3B%0A%20%20%20%0A%20%20%20var%20count%20%3D%200%3B%0A%20%20%20var%20location%20%3D%20new%20LeoHighlightsPosition%280%2C0%29%3B%0A%20%20%20var%20walk%20%3D%20elem%3B%0A%20%20%20while%20%28walk%20%21%3D%20null%20%26%26%20walk%20%21%3D%20ref%20%26%26%20count%20%3C%20LEO_HIGHLIGHTS_INFINITE_LOOP_COUNT%29%20%7B%0A%20%20%20%20%20%20location.x%20%2B%3D%20walk.offsetLeft%3B%0A%20%20%20%20%20%20location.y%20%2B%3D%20walk.offsetTop%3B%0A%20%20%20%20%20%20walk%20%3D%20walk.offsetParent%3B%0A%20%20%20%20%20%20count%2B%2B%3B%0A%20%20%20%7D%0A%20%20%20%0A%20%20%20_leoHighlightsDebugLog%28%22Location%20is%3A%20%22%2Belem.id%2B%22%20-%20%22%2Blocation%29%3B%0A%0A%20%20%20return%20location%3B%0A%7D%0A%0A/**%0A%20*%20This%20is%20used%20to%20update%20the%20position%20of%20an%20element%20as%20a%20popup%0A%20*%20%0A%20*%20@param%20IFrame%0A%20*%20@param%20anchor%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsUpdatePopupPos%28iFrame%2Canchor%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20//%20Gets%20the%20scrolled%20location%20for%20x%20and%20y%0A%20%20%20%20%20%20var%20scrolledPos%3Dnew%20LeoHighlightsPosition%280%2C0%29%3B%0A%20%20%20%20%20%20if%28%20self.pageYOffset%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20scrolledPos.x%20%3D%20self.pageXOffset%3B%0A%20%20%20%20%20%20%20%20%20scrolledPos.y%20%3D%20self.pageYOffset%3B%0A%20%20%20%20%20%20%7D%20else%20if%28%20document.documentElement%20%26%26%20document.documentElement.scrollTop%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20scrolledPos.x%20%3D%20document.documentElement.scrollLeft%3B%0A%20%20%20%20%20%20%20%20%20scrolledPos.y%20%3D%20document.documentElement.scrollTop%3B%0A%20%20%20%20%20%20%7D%20else%20if%28%20document.body%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20scrolledPos.x%20%3D%20document.body.scrollLeft%3B%0A%20%20%20%20%20%20%20%20%20scrolledPos.y%20%3D%20document.body.scrollTop%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Get%20the%20total%20dimensions%20to%20see%20what%20scroll%20bars%20might%20be%20active%20*/%0A%20%20%20%20%20%20var%20totalDim%3Dnew%20LeoHighlightsDimension%280%2C0%29%0A%20%20%20%20%20%20if%20%28document.all%20%26%26%20document.documentElement%20%26%26%20%0A%20%20%20%20%20%20%09document.documentElement.clientHeight%26%26document.documentElement.clientWidth%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%09totalDim.width%20%3D%20document.documentElement.scrollWidth%3B%0A%20%20%20%20%20%20%09totalDim.height%20%3D%20document.documentElement.scrollHeight%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%20if%20%28document.all%29%0A%20%20%20%20%20%20%7B%20/*%20This%20is%20in%20IE%20*/%0A%20%20%20%20%20%09%20%09totalDim.width%20%3D%20document.body.scrollWidth%3B%0A%20%20%20%20%20%20%09totalDim.height%20%3D%20document.body.scrollHeight%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%09%20totalDim.width%20%3D%20document.width%3B%0A%20%20%20%20%20%20%09%20totalDim.height%20%3D%20document.height%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20//%20Gets%20the%20location%20of%20the%20available%20screen%20space%0A%20%20%20%20%20%20var%20centerDim%3Dnew%20LeoHighlightsDimension%280%2C0%29%3B%0A%20%20%20%20%20%20if%28self.innerWidth%20%26%26%20self.innerHeight%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20centerDim.width%20%3D%20self.innerWidth-%28totalDim.height%3Eself.innerHeight?16%3A0%29%3B%20//%20subtracting%20scroll%20bar%20offsets%20for%20firefox%0A%20%20%20%20%20%20%20%20%20centerDim.height%20%3D%20self.innerHeight-%28totalDim.width%3Eself.innerWidth?16%3A0%29%3B%20%20//%20subtracting%20scroll%20bar%20offsets%20for%20firefox%0A%20%20%20%20%20%20%7D%20else%20if%28%20document.documentElement%20%26%26%20document.documentElement.clientHeight%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20centerDim.width%20%3D%20document.documentElement.clientWidth%3B%0A%20%20%20%20%20%20%20%20%20centerDim.height%20%3D%20document.documentElement.clientHeight%3B%0A%20%20%20%20%20%20%7D%20else%20if%28%20document.body%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20centerDim.width%20%3D%20document.body.clientWidth%3B%0A%20%20%20%20%20%20%20%20%20centerDim.height%20%3D%20document.body.clientHeight%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20//%20Get%20the%20current%20dimension%20of%20the%20popup%20element%0A%20%20%20%20%20%20var%20iFrameDim%3Dnew%20LeoHighlightsDimension%28iFrame.offsetWidth%2CiFrame.offsetHeight%29%0A%20%20%20%20%20%20if%20%28iFrameDim.width%20%3C%3D%200%29%0A%20%20%20%20%20%20%09iFrameDim.width%20%3D%20iFrame.style.width.substring%280%2C%20iFrame.style.width.indexOf%28%27px%27%29%29%3B%0A%20%20%20%20%20%20if%20%28iFrameDim.height%20%3C%3D%200%29%0A%20%20%20%20%20%20%09iFrameDim.height%20%3D%20iFrame.style.height.substring%280%2C%20iFrame.style.height.indexOf%28%27px%27%29%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Calculate%20the%20position%2C%20lower%20right%20hand%20corner%20by%20default%20*/%0A%20%20%20%20%20%20var%20position%3Dnew%20LeoHighlightsPosition%280%2C0%29%3B%0A%20%20%20%20%20%20position.x%3DscrolledPos.x%2BcenterDim.width-iFrameDim.width-LEO_HIGHLIGHTS_ADJUSTMENT.x%3B%0A%20%20%20%20%20%20position.y%3DscrolledPos.y%2BcenterDim.height-iFrameDim.height-LEO_HIGHLIGHTS_ADJUSTMENT.y%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28anchor%21%3Dnull%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20//centerDim%20in%20relation%20to%20the%20anchor%20element%20if%20available%0A%20%20%20%20%20%20%20%20%20var%20topOrBottom%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20%20var%20anchorPos%3D_leoHighlightsGetLocation%28document.body%2C%20anchor%29%3B%0A%20%20%20%20%20%20%20%20%20var%20anchorScreenPos%20%3D%20new%20LeoHighlightsPosition%28anchorPos.x-scrolledPos.x%2CanchorPos.y-scrolledPos.y%29%3B%0A%20%20%20%20%20%20%20%20%20var%20anchorDim%3Dnew%20LeoHighlightsDimension%28anchor.offsetWidth%2Canchor.offsetHeight%29%0A%20%20%20%20%20%20%20%20%20if%20%28anchorDim.width%20%3C%3D%200%29%0A%20%20%20%20%20%20%20%20%20%09anchorDim.width%20%3D%20anchor.style.width.substring%280%2C%20anchor.style.width.indexOf%28%27px%27%29%29%3B%0A%20%20%20%20%20%20%20%20%20if%20%28anchorDim.height%20%3C%3D%200%29%0A%20%20%20%20%20%20%20%20%20%09anchorDim.height%20%3D%20anchor.style.height.substring%280%2C%20anchor.style.height.indexOf%28%27px%27%29%29%3B%0A%0A%20%20%20%20%20%20%20%20%20//%20Check%20if%20the%20popup%20can%20be%20shown%20above%20or%20below%20the%20element%0A%20%20%20%20%20%20%20%20%20if%20%28centerDim.height%20-%20anchorDim.height%20-%20iFrameDim.height%20-%20anchorScreenPos.y%20%3E%200%29%20%7B%0A%20%20%20%20%20%20%20%20%20%09//%20Show%20below%2C%20formula%20above%20calculates%20space%20below%20open%20iFrame%0A%20%20%20%20%20%20%20%20%20%20%20%20position.y%20%3D%20anchorPos.y%20%2B%20anchorDim.height%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20topOrBottom%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%7D%20else%20if%20%28anchorScreenPos.y%20-%20anchorDim.height%20-%20iFrameDim.height%20%3E%200%29%20%7B%0A%20%20%20%20%20%20%20%20%20%09//%20Show%20above%2C%20formula%20above%20calculates%20space%20above%20open%20iFrame%0A%20%20%20%20%20%20%20%20%20%09position.y%20%3D%20anchorPos.y%20-%20iFrameDim.height%20-%20anchorDim.height%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20topOrBottom%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20_leoHighlightsDebugLog%28%22_leoHighlightsUpdatePopupPos%28%29%20-%20topOrBottom%3A%20%22%2BtopOrBottom%29%3B%0A%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20if%20%28topOrBottom%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20//%20We%20attempt%20top%20attach%20the%20window%20to%20the%20element%0A%20%20%20%20%20%20%20%20%20%09position.x%20%3D%20anchorPos.x%20-%20iFrameDim.width%20/%202%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28position.x%20%3C%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%09position.x%20%3D%200%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20if%20%28position.x%20%2B%20iFrameDim.width%20%3E%20scrolledPos.x%20%2B%20centerDim.width%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%09position.x%20%3D%20scrolledPos.x%20%2B%20centerDim.width%20-%20iFrameDim.width%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsDebugLog%28%22_leoHighlightsUpdatePopupPos%28%29%20-%20topOrBottom%3A%20%22%2Bposition%29%3B%0A%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20//%20Attempt%20to%20align%20on%20the%20right%20or%20left%20hand%20side%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28centerDim.width%20-%20anchorDim.width%20-%20iFrameDim.width%20-%20anchorScreenPos.x%20%3E%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20position.x%20%3D%20anchorPos.x%20%2B%20anchorDim.width%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20if%20%28anchorScreenPos.x%20-%20anchorDim.width%20-%20iFrameDim.width%20%3E%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%09position.x%20%3D%20anchorPos.x%20-%20anchorDim.width%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20%20//%20default%20to%20below%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20position.y%20%3D%20anchorPos.y%20%2B%20anchorDim.height%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsDebugLog%28%22_leoHighlightsUpdatePopupPos%28%29%20-%20sideBottom%3A%20%22%2Bposition%29%3B%0A%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Make%20sure%20that%20we%20don%27t%20go%20passed%20the%20right%20hand%20border%20*/%0A%20%20%20%20%20%20if%28position.x%2BiFrameDim.width%3EcenterDim.width-20%29%0A%20%20%20%20%20%20%09position.x%3DcenterDim.width-%28iFrameDim.width%2B20%29%3B%0A%20%20%20%20%20%20%09%09%0A%20%20%20%20%20%20//%20Make%20sure%20that%20we%20didn%27t%20go%20passed%20the%20start%0A%20%20%20%20%20%20if%28position.x%3C0%29%0A%20%20%20%20%20%20%20%20%20position.x%3D0%3B%0A%20%20%20%20%20%20if%28position.y%3C0%29%0A%20%20%20%20%20%20%09position.y%3D0%3B%0A%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22Popup%20info%20id%3A%20%20%20%20%20%20%20%22%20%2BiFrame.id%2B%22%20-%20%22%2Banchor.id%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5Cnscrolled%20%20%20%20%20%20%20%20%20%20%22%20%2B%20scrolledPos%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5Cncenter/visible%20%20%20%20%22%20%2B%20centerDim%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5Cnanchor%20%28absolute%29%20%22%20%2B%20anchorPos%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5Cnanchor%20%28screen%29%20%20%20%22%20%2B%20anchorScreenPos%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5CnSize%20%28anchor%29%20%20%20%20%20%22%20%2B%20anchorDim%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5CnSize%20%28popup%29%20%20%20%20%20%20%22%20%2B%20iFrameDim%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5CnResult%20pos%20%20%20%20%20%20%20%20%22%20%2B%20position%29%3B%0A%0A%20%20%20%20%20%20//%20Set%20the%20popup%20location%0A%20%20%20%20%20%20iFrame.style.left%20%3D%20position.x%20%2B%20%22px%22%3B%0A%20%20%20%20%20%20iFrame.style.top%20%20%3D%20position.y%20%2B%20%22px%22%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsUpdatePopupPos%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A%0A/**%0A%20*%20This%20will%20show%20the%20passed%20in%20element%20as%20a%20popup%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@param%20size%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsShowPopup%28anchorId%2Csize%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsSnoozed%29%0A%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%0A%20%20%20%09var%20popup%3Dnew%20LeoHighlightsPopup%28anchorId%2Csize%29%3B%0A%20%20%20%09popup.show%28%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsShowPopup%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A%0A/**%0A%20*%20This%20will%20transform%20the%20passed%20in%20url%20to%20a%20rover%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsGetRoverUrl%28url%29%0A%7B%0A%09var%20rover%3DLEO_HIGHLIGHTS_ROVER_TAG%3B%0A%09var%20roverUrl%3D%22http%3A//rover.ebay.com/rover/1/%22%2Brover%2B%22/4?%26mpre%3D%22%2BencodeURI%28url%29%3B%0A%09%0A%09return%20roverUrl%3B%0A%7D%0A%0A/**%0A%20*%20Sets%20the%20size%20of%20the%20bottom%20windown%20part%0A%20*%20%0A%20*%20@param%20size%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsSetBottomSize%28size%2CclickId%29%0A%7B%0A%20%20%20/*%20Get%20the%20elements%20*/%0A%20%20%20var%20iFrameBottom%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID%29%3B%0A%20%20%20var%20iFrameDiv%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_DIV_ID%29%3B%0A%0A%20%20%20/*%20Figure%20out%20the%20correct%20sizes%20*/%0A%20%20%20var%20iFrameBottomSize%3D%28size%3D%3D1%29?LEO_HIGHLIGHTS_IFRAME_BOTTOM_CLICK_SIZE%3ALEO_HIGHLIGHTS_IFRAME_BOTTOM_HOVER_SIZE%3B%0A%20%20%20var%20divSize%3D%28size%3D%3D1%29?LEO_HIGHLIGHTS_DIV_CLICK_SIZE%3ALEO_HIGHLIGHTS_DIV_HOVER_SIZE%3B%0A%0A%20%20%20/*%20Refresh%20the%20iFrame%27s%20url%2C%20by%20removing%20the%20size%20arg%20and%20adding%20it%20again%20*/%0A%20%20%20leoHighlightsUpdateUrl%28iFrameBottom%2Csize%2CclickId%29%3B%0A%0A%20%20%20/*%20Clear%20the%20hover%20flag%2C%20if%20the%20user%20shows%20this%20at%20full%20size%20*/%0A%20%20%20_leoHighlightsPrevElem.hover%3Dsize%3D%3D1?false%3Atrue%3B%0A%0A%20%20%20_leoHighlightsSetSize%28iFrameBottom%2CiFrameBottomSize%29%3B%0A%20%20%20_leoHighlightsSetSize%28iFrameDiv%2CdivSize%29%3B%0A%7D%0A%0A/**%0A%20*%20Class%20for%20a%20Popup%20%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@param%20size%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20LeoHighlightsPopup%28anchorId%2Csize%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22LeoHighlightsPopup%28%29%20%22%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%09this.anchorId%3DanchorId%3B%0A%20%20%20%09this.anchor%3D_leoHighlightsFindElementById%28this.anchorId%29%3B%0A%20%20%20%09this.topIframe%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_TOP_ID%29%3B%0A%20%20%20%20%20%20this.bottomIframe%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID%29%3B%0A%20%20%20%09this.iFrameDiv%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_DIV_ID%29%3B%0A%20%20%20%09%0A%20%20%20%09this.topIframe.src%3Dunescape%28this.anchor.getAttribute%28%27leoHighlights_url_top%27%29%29%3B%3B%0A%20%20%20%20%20%20this.bottomIframe.src%3Dunescape%28this.anchor.getAttribute%28%27leoHighlights_url_bottom%27%29%29%3B%3B%0A%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%221%29%20LeoHighlightsPopup%28%29%20%28%22%2Bthis.topIframe.style.top%2B%22%2C%20%22%2Bthis.topIframe.style.left%2B%22%29%22%29%3B%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%222%29%20LeoHighlightsPopup%28%29%20%28%22%2Bthis.bottomIframe.style.top%2B%22%2C%20%22%2Bthis.bottomIframe.style.left%2B%22%29%22%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%09leoHighlightsSetSize%28size%29%3B%0A%20%20%20%09%0A%20%20%20%09this.updatePos%3Dfunction%28%29%20%7B%20_leoHighlightsUpdatePopupPos%28this.iFrameDiv%2Cthis.anchor%29%3B%7D%3B%0A%20%20%20%20%20%20this.show%3Dfunction%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.updatePos%28%29%3B%20%0A%20%20%20%20%20%20%20%20%20%20%20%20this.iFrameDiv.style.visibility%20%3D%20%22visible%22%3B%20%0A%20%20%20%20%20%20%20%20%20%20%20%20this.iFrameDiv.style.display%20%3D%20%22block%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.updatePos%28%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsDebugLog%28%223%29%20LeoHighlightsPopup%28%29%20%28%22%2Bthis.topIframe.style.top%2B%22%2C%20%22%2Bthis.topIframe.style.left%2B%22%29%22%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsDebugLog%28%224%29%20LeoHighlightsPopup%28%29%20%28%22%2Bthis.bottomIframe.style.top%2B%22%2C%20%22%2Bthis.bottomIframe.style.left%2B%22%29%22%29%3B%0A%20%20%20%20%20%20%7D%3B%20%20%20%20%20%20%20%0A%20%20%20%09this.scroll%3Dfunction%28%29%20%7B%20this.updatePos%28%29%3B%7D%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22new%20LeoHighlightsPopup%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20updates%20the%20url%20for%20the%20iFrame%0A%20*%20%0A%20*%20@param%20iFrame%0A%20*%20@param%20size%0A%20*%20@param%20clickId%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsUpdateUrl%28iFrame%2Csize%2CclickId%2CdestUrl%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsUpdateUrl%28%29%20%22%2BdestUrl%29%3B%0A%20%20%20%20%20%20var%20url%3DiFrame.src%3B%0A%20%20%20%20%20%20var%20idx%3Durl.indexOf%28%22%26size%3D%22%29%3B%0A%20%20%20%20%20%20if%28idx%3E%3D0%29%0A%20%20%20%20%20%20%20%20%20url%3Durl.substring%280%2Cidx%29%3B%0A%20%20%20%20%20%20%0A//%20%20%20%20%20%20size%3D1%3B%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsUpdateUrl%28%29%20size%3D%22%2Bsize%2B%22%20%20%22%2Burl%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28size%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20url%2B%3D%28%22%26size%3D%22%2Bsize%29%3B%0A%20%20%20%20%20%20if%28clickId%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20url%2B%3D%28%22%26clickId%3D%22%2BclickId%29%3B%0A%20%20%20%20%20%20if%28destUrl%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20url%2B%3D%28%22%26url%3D%22%2BdestUrl%29%3B%0A%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsUpdateUrl%28%29%20%22%2Burl%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20iFrame.src%3Durl%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsUpdateUrl%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A%0A%0A/**%0A*%0A*%20This%20can%20be%20used%20to%20close%20an%20iframe%0A*%0A*%20@param%20id%0A*%20@return%0A*/%0Afunction%20leoHighlightsSetSize%28size%2CclickId%29%0A%7B%0A%09try%0A%09%7B%0A%09%09/*%20Get%20the%20element%20*/%0A%20%20%09%09var%20iFrameTop%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_TOP_ID%29%3B%0A%0A%20%20%09%09/*%20Figure%20out%20the%20correct%20sizes%20*/%0A%20%20%09%09var%20iFrameTopSize%3DLEO_HIGHLIGHTS_IFRAME_TOP_SIZE%3B%0A%20%20%09%09%0A%20%20%09%09/*%20Refresh%20the%20iFrame%27s%20url%2C%20by%20removing%20the%20size%20arg%20and%20adding%20it%20again%20*/%0A%20%20%09%09leoHighlightsUpdateUrl%28iFrameTop%2Csize%2CclickId%29%3B%0A%20%20%09%09%0A%20%20%09%09_leoHighlightsSetSize%28iFrameTop%2CiFrameTopSize%29%3B%0A%20%20%20%20%20%20_leoHighlightsSetBottomSize%28size%2CclickId%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Clear%20the%20hover%20flag%2C%20if%20the%20user%20shows%20this%20at%20full%20size%20*/%0A%20%20%20%20%20%20if%28size%3D%3D1%26%26_leoHighlightsPrevElem%29%0A%20%20%20%20%20%20%20%20%20_leoHighlightsPrevElem.hover%3Dfalse%3B%20%20%20%20%20%20%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsSetSize%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A%20*%20Start%20the%20popup%20a%20little%20bit%20delayed.%0A%20*%20Somehow%20IE%20needs%20some%20time%20to%20find%20the%20element%20by%20id.%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@param%20size%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsShowPopup%28anchorId%2Csize%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsSnoozed%29%0A%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%0A%20%20%09%09var%20elem%3D_leoHighlightsFindElementById%28anchorId%29%3B%0A%20%20%09%09if%28_leoHighlightsPrevElem%26%26%28_leoHighlightsPrevElem%21%3Delem%29%29%0A%20%20%09%09%09_leoHighlightsPrevElem.shown%3Dfalse%3B%0A%20%20%09%09elem.shown%3Dtrue%3B%0A%09%09_leoHighlightsPrevElem%3Delem%3B%0A%09%09%0A%09%09_leoHighlightsDebugLog%28%22leoHighlightsShowPopup%28%29%20%22%2B_leoHighlightsPrevElem%29%3B%09%09%0A%20%20%20%09%0A%20%20%20%09/*%20FF%20needs%20to%20find%20the%20element%20first%20*/%0A%20%20%20%09_leoHighlightsFindElementById%28anchorId%29%3B%0A%20%20%20%09%0A%20%20%20%09setTimeout%28%22_leoHighlightsShowPopup%28%5C%27%22%2BanchorId%2B%22%5C%27%2C%5C%27%22%2Bsize%2B%22%5C%27%29%3B%22%2C10%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHighlightsShowPopup%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A*%0A*%20This%20can%20be%20used%20to%20close%20an%20iframe%0A*%0A*%20@param%20id%0A*%20@return%0A*/%0Afunction%20leoHighlightsHideElem%28id%29%0A%7B%0A%09try%0A%09%7B%0A%09%09/*%20Get%20the%20appropriate%20sizes%20*/%0A%20%20%09%09var%20elem%3D_leoHighlightsFindElementById%28id%29%3B%0A%20%20%09%09if%28elem%29%0A%20%20%09%09%09elem.style.visibility%3D%22hidden%22%3B%0A%20%20%09%09%0A%20%20%09%09/*%20Clear%20the%20page%20for%20the%20next%20run%20through%20*/%0A%20%20%09%09var%20iFrame%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_TOP_ID%29%3B%0A%20%20%09%09if%28iFrame%29%0A%20%20%09%09%09iFrame.src%3D%22about%3Ablank%22%3B%0A%20%20%20%20%20%20var%20iFrame%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID%29%3B%0A%20%20%20%20%20%20if%28iFrame%29%0A%20%20%20%20%20%20%20%20%20iFrame.src%3D%22about%3Ablank%22%3B%0A%20%20%09%09%0A%20%20%09%09%0A%20%20%09%09if%28_leoHighlightsPrevElem%29%0A%20%20%09%09%7B%0A%20%20%09%09%09_leoHighlightsPrevElem.shown%3Dfalse%3B%0A%20%20%09%09%09_leoHighlightsPrevElem%3Dnull%3B%0A%20%20%09%09%7D%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHideElem%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A*%0A*%20This%20can%20be%20used%20to%20close%20an%20iframe.%0A*%20Since%20the%20iFrame%20is%20reused%20the%20frame%20only%20gets%20hidden%0A*%0A*%20@return%0A*/%0Afunction%20leoHighlightsIFrameClose%28%29%0A%7B%0A%20%20try%0A%20%20%7B%0A%09%20%20_leoHighlightsSimpleGwCallBack%28%22LeoHighlightsHideIFrame%22%29%3B%0A%20%20%7D%0A%20%20catch%28e%29%0A%20%20%7B%0A%09%20%20_leoHighlightsReportExeception%28%22leoHighlightsIFrameClose%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%7D%0A%7D%0A%0A/**%0A*%0A*%20This%20is%20used%20to%20snooze%20the%20highlights.%0A*%0A*%20@return%0A*/%0Afunction%20leoHighlightsSnooze%28%29%0A%7B%0A%20%20try%0A%20%20%7B%0A%20%20%20%20%20_leoHighlightsSnoozed%3Dtrue%3B%0A%20%20%20%20%20_leoHighlightsSimpleGwCallBack%28%22LeoHighlightsSnooze%22%29%3B%0A%20%20%7D%0A%20%20catch%28e%29%0A%20%20%7B%0A%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsSnooze%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%7D%0A%7D%0A%0A/**%0A*%0A*%20This%20is%20used%20to%20snooze%20the%20highlights.%0A*%20This%20gets%20fired%20into%20the%20top%20frame.%0A*%0A*%20@return%0A*/%0Afunction%20leoHighlightsSnoozeTop%28id%29%0A%7B%0A%20%20try%0A%20%20%7B%0A%20%20%20%20%20_leoHighlightsSnoozed%3Dtrue%3B%0A%20%20%20%20%20leoHighlightsHideElem%28id%29%3B%0A%20%20%7D%0A%20%20catch%28e%29%0A%20%20%7B%0A%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsSnoozeTop%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%7D%0A%7D%0A%0A%0A/**%0A%20*%20This%20should%20handle%20the%20click%20events%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleClick%28anchorId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsSnoozed%29%0A%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28_leoHighlightsIsFrame%28%29%29%0A%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%0A%20%20%09%09var%20anchor%3D_leoHighlightsFindElementById%28anchorId%29%3B%0A%20%20%09%09anchor.hover%3Dfalse%3B%0A%20%20%09%09if%28anchor.startTimer%29%0A%20%20%09%09%09clearTimeout%28anchor.startTimer%29%3B%0A%20%20%20%09%0A%20%20%20%20%20%20/*%20Report%20the%20click%20event%20*/%0A%20%20%20%20%20%20leoHighlightsReportEvent%28%22clicked%22%2C%20window.document.domain%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsGetAttrib%28anchor%2C%27leohighlights_keywords%27%29%2Cnull%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsGetAttrib%28anchor%2C%27leohighlights_accept%27%29%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsGetAttrib%28anchor%2C%27leohighlights_reject%27%29%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%09leoHighlightsShowPopup%28anchorId%2C1%29%3B%0A%20%20%20%09return%20false%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHighlightsHandleClick%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A%20*%20This%20should%20handle%20the%20hover%20events%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleHover%28anchorId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsSnoozed%29%0A%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28_leoHighlightsIsFrame%28%29%29%0A%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%0A%20%20%09%09var%20anchor%3D_leoHighlightsFindElementById%28anchorId%29%3B%0A%20%20%09%09anchor.hover%3Dtrue%3B%0A%20%20%09%09%0A%20%20%20%20%20%20/*%20Report%20the%20hover%20event%20*/%0A%20%20%20%20%20%20leoHighlightsReportEvent%28%22hovered%22%2C%20window.document.domain%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsGetAttrib%28anchor%2C%27leohighlights_keywords%27%29%2Cnull%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsGetAttrib%28anchor%2C%27leohighlights_accept%27%29%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsGetAttrib%28anchor%2C%27leohighlights_reject%27%29%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%09leoHighlightsShowPopup%28anchorId%2C0%29%3B%0A%20%20%20%09return%20false%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHighlightsHandleHover%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A%20*%20This%20will%20handle%20the%20mouse%20over%20setup%20timers%20for%20the%20appropriate%20timers%0A%20*%20%0A%20*%20@param%20id%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleMouseOver%28id%29%0A%7B%0A%09try%0A%09%7B%0A%20%20%20%20%20%20if%28_leoHighlightsSnoozed%29%0A%20%20%20%20%20%20%20%20%20return%3B%0A%09%20%20%20%0A%09%20%20%20if%28_leoHighlightsIsFrame%28%29%29%0A%09%20%20%20%20%20%20return%3B%0A%09%20%20%20%0A%09%09var%20anchor%3D_leoHighlightsFindElementById%28id%29%3B%09%09%0A%0A%09%09/*%20Clear%20the%20end%20timer%20if%20required%20*/%0A%09%09if%28anchor.endTimer%29%0A%09%09%09clearTimeout%28anchor.endTimer%29%3B%0A%09%09anchor.endTimer%3Dnull%3B%0A%09%09%0A%09%09anchor.style.background%3DLEO_HIGHLIGHTS_BACKGROUND_STYLE_HOVER%3B%0A%09%09%0A%09%09var%20underline%3D_leoHighlightsGetAttrib%28anchor%2C%22leohighlights_underline%22%29%3D%3D%27true%27%3B%0A%09%09%0A%09%09/*%20The%20element%20is%20already%20showing%20we%20are%20done%20*/%0A%09%09if%28anchor.shown%29%0A%09%09%09return%3B%0A%09%09%0A%09%09/*%20Setup%20the%20start%20timer%20if%20required%20*/%0A%09%09anchor.startTimer%3DsetTimeout%28function%28%29%7B%0A%09%09%09leoHighlightsHandleHover%28anchor.id%29%3B%0A%09%09%09anchor.hover%3Dtrue%3B%0A%09%09%09%7D%2Cunderline?LEO_HIGHLIGHTS_SHOW_DELAY_MS%3ALEO_HIGHLIGHTS_SHOW_DELAY_NO_UNDER_MS%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHandleMouseOver%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20handle%20the%20mouse%20over%20setup%20timers%20for%20the%20appropriate%20timers%0A%20*%20%0A%20*%20@param%20id%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleMouseOut%28id%29%0A%7B%0A%09try%0A%09%7B%09%0A%09%09var%20anchor%3D_leoHighlightsFindElementById%28id%29%3B%0A%09%09%0A%09%09/*%20Clear%20the%20start%20timer%20if%20required%20*/%0A%09%09if%28anchor.startTimer%29%0A%09%09%09clearTimeout%28anchor.startTimer%29%3B%0A%09%09anchor.startTimer%3Dnull%3B%0A%09%09%0A%09%09anchor.style.background%3DLEO_HIGHLIGHTS_BACKGROUND_STYLE_DEFAULT%3B%0A%09%09if%28%21anchor.shown||%21anchor.hover%29%0A%09%09%09return%3B%0A%09%09%0A%09%09/*%20Setup%20the%20start%20timer%20if%20required%20*/%0A%09%09anchor.endTimer%3DsetTimeout%28function%28%29%7B%0A%09%09%09leoHighlightsHideElem%28LEO_HIGHLIGHTS_IFRAME_DIV_ID%29%3B%0A%09%09%09anchor.shown%3Dfalse%3B%0A%09%09%09_leoHighlightsPrevElem%3Dnull%3B%0A%09%09%09%7D%2CLEO_HIGHLIGHTS_HIDE_DELAY_MS%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHandleMouseOut%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A%20*%20This%20handles%20the%20mouse%20movement%20into%20the%20currently%20opened%20window.%0A%20*%20Just%20clear%20the%20close%20timer%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleIFrameMouseOver%28%29%0A%7B%0A%09try%0A%09%7B%0A%09%09if%28_leoHighlightsPrevElem%26%26_leoHighlightsPrevElem.endTimer%29%0A%09%09%09clearTimeout%28_leoHighlightsPrevElem.endTimer%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHandleIFrameMouseOver%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A%20*%20This%20handles%20the%20mouse%20movement%20into%20the%20currently%20opened%20window.%0A%20*%20Just%20clear%20the%20close%20timer%0A%20*%20%0A%20*%20@param%20id%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleIFrameMouseOut%28%29%0A%7B%0A%09try%0A%09%7B%0A%09%09if%28_leoHighlightsPrevElem%29%0A%09%09%09leoHighlightsHandleMouseOut%28_leoHighlightsPrevElem.id%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHandleIFrameMouseOut%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A/**%0A%20*%20This%20is%20a%20method%20is%20used%20to%20make%20the%20javascript%20within%20IE%20runnable%0A%20*/%0Avar%20leoHighlightsRanUpdateDivs%3Dfalse%3B%0Afunction%20leoHighlightsUpdateDivs%28%29%0A%7B%0A%09try%0A%09%7B%0A%09%09/*%20Check%20if%20this%20is%20an%20IE%20browser%20and%20if%20divs%20have%20been%20updated%20already%20*/%0A%09%09if%28document.all%26%26%21leoHighlightsRanUpdateDivs%26%26%21_leoHighlightsIsFrame%28%29%29%0A%09%09%7B%0A%09%09%09leoHighlightsRanUpdateDivs%3Dtrue%3B%20//%20Set%20early%20to%20prevent%20running%20twice%0A%09%09%09for%28var%20i%3D0%3Bi%3CLEO_HIGHLIGHTS_MAX_HIGHLIGHTS%3Bi%2B%2B%29%0A%09%09%09%7B%0A%09%09%09%09var%20id%3D%22leoHighlights_Underline_%22%2Bi%3B%0A%09%09%09%09var%20elem%3D_leoHighlightsFindElementById%28id%29%3B%0A%09%09%09%09if%28elem%3D%3Dnull%29%0A%09%09%09%09%09break%3B%0A%09%09%09%09%0A%09%09%09%09if%28%21elem.leoChanged%29%0A%09%09%09%09%7B%0A%09%09%09%09%09elem.leoChanged%3Dtrue%3B%0A%09%09%09%09%0A%09%09%09%09%09/*%20This%20will%20make%20javaScript%20runnable%20*/%09%09%09%09%0A%09%09%09%09%09elem.outerHTML%3Delem.outerHTML%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsUpdateDivs%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0Aif%28document.all%29%0A%09setTimeout%28leoHighlightsUpdateDivs%2C200%29%3B%0A%0A%0A/**%0A%20*%20This%20is%20used%20to%20report%20events%20to%20the%20plugin%0A%20*%20@param%20key%0A%20*%20@param%20domain%0A%20*%20@param%20keywords%0A%20*%20@param%20vendorId%0A%20*%20@param%20accept%0A%20*%20@param%20reject%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsReportEvent%28key%2C%20domain%2Ckeywords%2CvendorId%2Caccept%2Creject%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22key%22%2Ckey%29%3B%0A%20%20%20%20%20%20if%28domain%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22domain%22%2Cdomain%29%3B%0A%20%20%20%20%20%20if%28keywords%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22keywords%22%2Ckeywords%29%3B%0A%20%20%20%20%20%20if%28vendorId%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22vendorId%22%2CvendorId%29%3B%0A%20%20%20%20%20%20if%28accept%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22accept%22%2Caccept%29%3B%0A%20%20%20%20%20%20if%28reject%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22reject%22%2Creject%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20gwObj.callName%28%22LeoHighlightsEvent%22%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlights%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20expand%20or%20collapse%20the%20window%20base%20on%20it%20prior%20state%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsToggleSize%28clickId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%20%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsToggleSize%28%29%20%22%2B_leoHighlightsPrevElem%29%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Get%20the%20hover%20flag%20and%20change%20the%20status%20*/%0A%20%20%20%20%20%20var%20size%3D_leoHighlightsPrevElem.hover?1%3A0%3B%0A%20%20%20%20%20%20_leoHighlightsSetBottomSize%28size%2CclickId%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsToggleSize%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20Call%20into%20the%20kvm%20that%20will%20then%20do%20a%20callback%20into%20the%20top%20window%0A%20*%20The%20top%20window%20will%20then%20call%20leoH%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsSetSecondaryWindowUrl%28url%2C%20customerId%2C%20phraseId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsSetSecondaryWindowUrl%28%29%20%22%2Burl%29%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22url%22%2C%20url%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22phraseId%22%2C%20phraseId%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22customerId%22%2C%20customerId%29%3B%0A%20%20%20%20%20%20gwObj.callName%28%22LeoHighlightsSetSecondaryWindowUrl%22%29%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsSetSecondaryWindowUrl%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20Call%20into%20the%20kvm%20that%20will%20then%20do%20a%20callback%20into%20the%20top%20window%0A%20*%20The%20top%20window%20will%20then%20call%20leoH%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsSetSecondaryWindowUrlCallback%28url%2C%20customerId%2C%20phraseId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsSetSecondaryWindowUrlCallback%28%29%20%22%2Burl%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Clear%20the%20hover%20flag%2C%20if%20the%20user%20shows%20this%20at%20full%20size%20*/%0A%20%20%20%20%20%20var%20size%3D_leoHighlightsPrevElem.hover?0%3A1%3B%20%20%20%20%20%20%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsSetSecondaryWindowUrlCallback%28%29%20%22%2B_leoHighlightsPrevElem%2B%22%20--%20%22%2B_leoHighlightsPrevElem.hover%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Get%20the%20elements%20*/%0A%20%20%20%20%20%20var%20iFrameBottom%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID%29%3B%0A%20%20%20%20%20%20leoHighlightsUpdateUrl%28iFrameBottom%2Csize%2Cnull%2Curl%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsSetSecondaryWindowUrlCallback%28%29%20%22%2Burl%29%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsSetSecondaryWindowUrlCallback%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20set%20the%20text%20to%20the%20Top%20%0A%20*%20%0A%20*%20@param%20txt%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsSetExpandTxt%28txt%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%0A%20%20%20%20%20%20var%20topIFrame%20%3D%20_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_TOP_ID%29%3B%0A%20%20%20%20%20%20if%28topIFrame%3D%3Dnull%29%0A%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Get%20the%20current%20url%20*/%0A%20%20%20%20%20%20var%20url%3DtopIFrame.src%3B%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28url%3D%3Dnull%29%0A%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Extract%20the%20previous%20hash%20if%20present%20*/%0A%20%20%20%20%20%20var%20idx%3D-1%3B%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28%28idx%3Durl.indexOf%28%27%23%27%29%29%3E0%29%0A%20%20%20%20%20%20%20%20%20url%3Durl.substring%280%2Cidx%29%3B%0A%0A%20%20%20%20%20%20/*%20Append%20the%20text%20to%20the%20end%20*/%0A%20%20%20%20%20%20url%2B%3D%22%23%22%2BencodeURI%28txt%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Set%20the%20iframe%20with%20the%20new%20url%20that%20contains%20the%20hash%20tag%20*/%0A%20%20%20%20%20%20topIFrame.src%3Durl%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsSetExpandTxt%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/*----------------------------------------------------------------------*/%0A/*%20Methods%20provided%20to%20the%20highlight%20providers...%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20*/%0A/*----------------------------------------------------------------------*/%0A%0A/**%0A%20*%20This%20will%20set%20the%20expand%20text%20for%20the%20Top%20window%0A%20*/%0Afunction%20leoHL_SetExpandTxt%28txt%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHL_SetExpandTxt%28%29%20%22%2Btxt%29%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20_leoHighlightsSimpleGwCallBack%28%22LeoHighlightsSetExpandTxt%22%2C%22expandTxt%22%2Ctxt%29%3B%20%20%20%20%20%20%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHL_SetExpandTxt%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20redirect%20the%20top%20window%20to%20the%20passed%20in%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@param%20parentId%0A%20*%20@return%0A%20*/%0Afunction%20leoHL_RedirectTop%28url%2CparentId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%0A%20%20%20%20%20%20try%7B%0A%20%20%20%20%20%20%20%20%20var%20domain%3D_leoHighlightsGetUrlArg%28window.document.URL%2C%22domain%22%29%0A%20%20%20%20%20%20%20%20%20var%20keywords%3D_leoHighlightsGetUrlArg%28window.document.URL%2C%22keywords%22%29%0A%20%20%20%20%20%20%20%20%20var%20vendorId%3D_leoHighlightsGetUrlArg%28window.document.URL%2C%22vendorId%22%29%0A%20%20%20%20%20%20leoHighlightsReportEvent%28%22clickthrough%22%2C%20domain%2Ckeywords%2C%20vendorId%29%3B%0A%20%20%20%20%20%20%7Dcatch%28e%29%7B%0A%20%20%20%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHL_RedirectTop%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%20%20%20%20%7D%0A%20%20%09%09%0A%20%20%20%09_leoHighlightsRedirectTop%28url%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHL_RedirectTop%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20redirect%20the%20top%20window%20to%20the%20passed%20in%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@param%20parentId%0A%20*%20@return%0A%20*/%0Afunction%20LeoHL_RedirectTop%28url%2CparentId%29%0A%7B%0A%20%20%20leoHL_RedirectTop%28url%2CparentId%29%3B%0A%7D%0A%0A/**%0A%20*%20This%20will%20redirect%20the%20top%20window%20to%20the%20passed%20in%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@param%20parentId%0A%20*%20@return%0A%20*/%0Afunction%20leoHL_RedirectTopAd%28url%2CparentId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%0A%20%20%20%20%20%20try%7B%0A%20%20%20%20%20%20%20%20%20var%20domain%3D_leoHighlightsGetUrlArg%28window.document.URL%2C%22domain%22%29%0A%20%20%20%20%20%20%20%20%20var%20keywords%3D_leoHighlightsGetUrlArg%28window.document.URL%2C%22keywords%22%29%0A%20%20%20%20%20%20%20%20%20var%20vendorId%3D_leoHighlightsGetUrlArg%28window.document.URL%2C%22vendorId%22%29%0A%20%20%20%20%20%20leoHighlightsReportEvent%28%22advertisement.click%22%2C%20domain%2Ckeywords%2C%20vendorId%29%3B%0A%20%20%20%20%20%20%7Dcatch%28e%29%7B%0A%20%20%20%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHL_RedirectTopAd%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20_leoHighlightsRedirectTop%28url%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHL_RedirectTopAd%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A%0A/**%0A%20*%20This%20will%20set%20the%20size%20of%20the%20iframe%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@param%20parentId%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHl_setSize%28size%2Curl%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09/*%20Get%20the%20clickId%20*/%0A%20%20%20%09var%20clickId%3D_leoHighlightsGetUrlArg%28%20url%2C%22clickId%22%29%0A%20%20%20%09%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22size%22%2Csize%29%3B%0A%20%20%20%20%20%20if%28clickId%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22clickId%22%2CclickId%2B%22_blah%22%29%3B%0A%20%20%20%20%20%20gwObj.callName%28%22LeoHighlightsSetSize%22%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHl_setSize%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20toggle%20the%20size%20of%20the%20window%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHl_ToggleSize%28%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20gwObj.callName%28%22LeoHighlightsToggleSize%22%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHl_ToggleSize%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A"); &lt;/script&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-4958067407046071450?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/4958067407046071450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/02/apexdoc-eclipse-plugin-for-forcecom-ide.html#comment-form' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/4958067407046071450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/4958067407046071450'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/02/apexdoc-eclipse-plugin-for-forcecom-ide.html' title='ApexDoc Eclipse Plugin For Force.com IDE'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_IGUMdDVFXNs/TUf6eOIrdRI/AAAAAAAABeE/saN4JHNFeqY/s72-c/apex_doc_plugin_logo.png' height='72' width='72'/><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-6610869077402102860</id><published>2011-01-25T08:00:00.000-08:00</published><updated>2011-01-27T08:50:14.338-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='apexdoc'/><category scheme='http://www.blogger.com/atom/ns#' term='javadoc'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><category scheme='http://www.blogger.com/atom/ns#' term='client'/><title type='text'>ApexDoc - A Salesforce Code Documentation Tool</title><content type='html'>Hi All,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Most of you java people may be familar with "javadoc" utility, and who are not from java they must know about good code documentation :).&lt;br /&gt;&lt;br /&gt;A good documentation is always a good thing for your project for long term success. A good documentation contains well defined comments, usage, public methods used, their parameters, return types, author, dates etc. Generally documentations used for a open source project or a library projects, so that if any new person is using your library or project then he will get good help about that easily.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;I am working in Salesforce about 3 years with lot of Apex coding. I also created some libraries in Apex also. I wanted something similar documentation for my work using same like javadoc. But i could not found any &lt;leo_highlight style="border-bottom: 2px solid rgb(255, 255, 150); background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_0" onclick="leoHighlightsHandleClick('leoHighlights_Underline_0')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_0')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_0')" leohighlights_keywords="tool" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Dtool%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Dtool%26domain%3Dwww.blogger.com" leohighlights_underline="true"&gt;tool&lt;/leo_highlight&gt; exist for that. So started this utility project in java. My main moto is to make it as simpler as 'javadoc' command. So, here comes my 'apexdoc'.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_IGUMdDVFXNs/TUEFLHI5h6I/AAAAAAAABd4/tF-ALYxN95A/s1600/apex_doc_logo.png"&gt;&lt;img style="cursor: pointer; width: 147px; height: 80px;" src="http://1.bp.blogspot.com/_IGUMdDVFXNs/TUEFLHI5h6I/AAAAAAAABd4/tF-ALYxN95A/s320/apex_doc_logo.png" alt="" id="BLOGGER_PHOTO_ID_5566736302859716514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Guidelines to use apexdoc:-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Go to here &lt;a href="http://www.aslambari.com/apexdoc.html"&gt;http://www.aslambari.com/apexdoc.html&lt;/a&gt; and download the "apexdoc" java client. You can also find one screen cast there. Its a zip, so after download, unzip it on your disc, for example D:\apexdoc.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Command Syntax:-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;apexdoc&lt;/span&gt; &amp;lt;source_directory&amp;gt; [&amp;lt;&lt;leo_highlight style="border-bottom: 2px solid rgb(255, 255, 150); background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_1" onclick="leoHighlightsHandleClick('leoHighlights_Underline_1')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_1')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_1')" leohighlights_keywords="target" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Dtarget%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Dtarget%26domain%3Dwww.blogger.com" leohighlights_underline="true"&gt;target&lt;/leo_highlight&gt;_directory?&amp;gt;] [&amp;lt;homefile&amp;gt;] [&amp;lt;authorfile&amp;gt;]&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;1) &lt;span style="font-weight: bold;"&gt;source_directory&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;source_directory&gt;&lt;/source_directory&gt;&lt;/span&gt; :- The folder location which contains your apex .cls classes. Ideally it is the folder 'classes' under your &lt;leo_highlight style="border-bottom: 2px solid rgb(255, 255, 150); background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_2" onclick="leoHighlightsHandleClick('leoHighlights_Underline_2')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_2')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_2')" leohighlights_keywords="eclipse" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Declipse%26domain%3Dwww.blogger.com" leohighlights_underline="true"&gt;Eclipse&lt;/leo_highlight&gt; IDE project setup on disc under "src" subfolder. I think best is that you should first copy that classes folder somewhere on disc for example "D:\myproject\classes\", and use this as source folder.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;2) &lt;span style="font-weight: bold;"&gt;&lt;leo_highlight style="border-bottom: 2px solid rgb(255, 255, 150); background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_3" onclick="leoHighlightsHandleClick('leoHighlights_Underline_3')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_3')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_3')" leohighlights_keywords="target" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Dtarget%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Dtarget%26domain%3Dwww.blogger.com" leohighlights_underline="true"&gt;target&lt;/leo_highlight&gt;_directory&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;target_directory&gt;&lt;/target_directory&gt;&lt;/span&gt; :- This option is optional. This is to specify your &lt;leo_highlight style="border-bottom: 2px solid rgb(255, 255, 150); background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_4" onclick="leoHighlightsHandleClick('leoHighlights_Underline_4')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_4')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_4')" leohighlights_keywords="target" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Dtarget%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Dtarget%26domain%3Dwww.blogger.com" leohighlights_underline="true"&gt;target&lt;/leo_highlight&gt; folder where documentation will be generated. If not given then it will generates the output documentation into current directory.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;3) &lt;span style="font-weight: bold;"&gt;homefile&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;homefile&gt;&lt;/homefile&gt;&lt;/span&gt; :- This option is optional. This is to specify your contents for the home page right panel, Ideally it contains the project information for which you making documentation and it MUST be in html format containing data under tags.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;4) &lt;span style="font-weight: bold;"&gt;authorfile&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;authorfile&gt;&lt;/authorfile&gt;&lt;/span&gt; :- This option is optional. This is a simple text file path containing following info.&lt;br /&gt;&lt;br /&gt;---------------------&lt;br /&gt;projectname=&amp;lt;project name will be shown on top header&amp;gt;&lt;br /&gt;authorname=&amp;lt;author name will be shown on top header&amp;gt;&lt;br /&gt;email=&amp;lt;email will be shown on top header&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;sampleauthor.txt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;----------------------&lt;/span&gt;&lt;br /&gt;projectname=my project&lt;br /&gt;authorname=Aslam Bari&lt;br /&gt;email=aslam.bari@gmail.com&lt;br /&gt;&lt;br /&gt;5) Ideally if you need logo at top of your documentation header, you must put your file under your &lt;leo_highlight style="background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_5" onclick="leoHighlightsHandleClick('leoHighlights_Underline_5')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_5')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_5')" leohighlights_keywords="target" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Dtarget%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Dtarget%26domain%3Dwww.blogger.com" leohighlights_underline="false"&gt;target&lt;/leo_highlight&gt; directory with name &lt;span style="font-weight: bold;"&gt;logo.jpg&lt;/span&gt; with dimension.&lt;br /&gt;&lt;br /&gt;Sample commands:-&lt;br /&gt;1) &lt;span style="font-weight: bold;"&gt;Sample 1:-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;apexdoc D:\myproject\classes D:\home\html  D:\myhome.html  D:\myauthor.txt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It will generate documentation of all "*.cls" files containing under "D:\myproject\classes" folder and output will be generated under "D:\home\html" folder with name "ApexDocumentation", your home page will contain project info from "D:\myhome.html" file, and your header will get contents from D:\myauthor.txt file.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;2) &lt;span style="font-weight: bold;"&gt;Sample 2:-&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;apexdoc D:\myproject\classes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It will generate documentation in current folder of given source directory "D:\myproject\classes".&lt;br /&gt;&lt;br /&gt;If all goes fine you will get one good documentation of all your classes, public properties and public methods generated. One sample generated output is here:-&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Guidelines for comments and code:-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You code must have two types of comments. One for Classes, one for Methods. By default all public properties will be fetched in documentation, no need for comments for them.&lt;br /&gt;Comments must start with /** and ends with */&lt;br /&gt;Following attributes are supported for now:-&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-style: italic;"&gt;@author&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-style: italic;"&gt;@date&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-style: italic;"&gt;@param&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-style: italic;"&gt;@param&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-style: italic;"&gt;---(multiple @param supported)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-style: italic;"&gt;@description&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-style: italic;"&gt;@return&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Some sample code with comments as below:-&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;@author            Aslam Bari&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;@date            25/01/2011&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;@description    Class calculates some accounting information based on user experience and given methods. Usually user need to make one object of the class and call methods direcly.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;public class Accounting{&lt;br /&gt;public string accountNo {get;set;}&lt;br /&gt;public Integer discount {get;set;}&lt;br /&gt;public string bankname {get;set;}&lt;br /&gt;&lt;br /&gt;private string balance = 0;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;    /**&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;    * @author            Mark P&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;@date            25/01/2011&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;@description    It accepts one account number and discount from external&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;                    user and calculates some info based on user profile and return the total price.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;@param            accountNumber    Users account number &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;@param            discount        discount applicable for the user&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;@return            Double            Price calculated after calculating based on profile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;    */&lt;/span&gt;&lt;br /&gt;public double calculatePrice(string accountNumber, integer discount){&lt;br /&gt;-----------------&lt;br /&gt;-----------------&lt;br /&gt;-----------------&lt;br /&gt;return price;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This &lt;leo_highlight style="background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_6" onclick="leoHighlightsHandleClick('leoHighlights_Underline_6')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_6')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_6')" leohighlights_keywords="tool" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Dtool%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Dtool%26domain%3Dwww.blogger.com" leohighlights_underline="false"&gt;tool&lt;/leo_highlight&gt; is in Beta version and may contains bugs. I would like to get your feedbacks on this and will surely enhance this &lt;leo_highlight style="background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; -moz-background-size: auto auto; cursor: pointer; display: inline; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="leoHighlights_Underline_7" onclick="leoHighlightsHandleClick('leoHighlights_Underline_7')" onmouseover="leoHighlightsHandleMouseOver('leoHighlights_Underline_7')" onmouseout="leoHighlightsHandleMouseOut('leoHighlights_Underline_7')" leohighlights_keywords="tool" leohighlights_url_top="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsTop.jsp?keywords%3Dtool%26domain%3Dwww.blogger.com" leohighlights_url_bottom="http%3A//shortcuts.thebrowserhighlighter.com/leonardo/plugin/highlights/3_2/tbh_highlightsBottom.jsp?keywords%3Dtool%26domain%3Dwww.blogger.com" leohighlights_underline="false"&gt;tool&lt;/leo_highlight&gt; based on your reported bugs and feedback. Reach me at aslam.bari@gmail.com&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;br /&gt;&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;span id="leoHighlights_iframe_modal_span_container"&gt;&lt;div id="leoHighlights_iframe_modal_div_container" style="position: absolute; visibility: hidden; display: none; width: 520px; height: 391px; z-index: 2147483647;" onmouseover="leoHighlightsHandleIFrameMouseOver();" onmouseout="leoHighlightsHandleIFrameMouseOut();"&gt;        &lt;!-- Top iFrame --&gt;    &lt;iframe id="leoHighlights_top_iframe" name="leoHighlights_top_iframe" title="leoHighlights_top_iframe" src="about:blank" vspace="0" hspace="0" marginwidth="0" marginheight="0" allowtransparency="true" style="position: absolute; top: 0px; left: 0px; width: 520px; height: 294px; z-index: 2147483647;" width="520" frameborder="0" height="294" scrolling="no"&gt;    &lt;/iframe&gt;        &lt;!-- Bottom iFrame --&gt;    &lt;iframe id="leoHighlights_bottom_iframe" name="leoHighlights_bottom_iframe" title="leoHighlights_bottom_iframe" src="about:blank" vspace="0" hspace="0" marginwidth="0" marginheight="0" allowtransparency="true" style="position: absolute; top: 294px; left: 96px; z-index: 2147483647;" width="" frameborder="0" height="" scrolling="no"&gt;    &lt;/iframe&gt; &lt;/div&gt;  &lt;script defer="defer" type="text/javascript"&gt;    var LEO_HIGHLIGHTS_INFINITE_LOOP_COUNT =              300;    var LEO_HIGHLIGHTS_MAX_HIGHLIGHTS =                   50;    var LEO_HIGHLIGHTS_IFRAME_TOP_ID =                    "leoHighlights_top_iframe";    var LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID =                 "leoHighlights_bottom_iframe";    var LEO_HIGHLIGHTS_IFRAME_DIV_ID =                    "leoHighlights_iframe_modal_div_container";           var LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_WIDTH =     520;    var LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_HEIGHT =    391;        var LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_WIDTH =      520;    var LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_HEIGHT =     665;        var LEO_HIGHLIGHTS_IFRAME_TOP_POS_X =                 0;    var LEO_HIGHLIGHTS_IFRAME_TOP_POS_Y =                 0;    var LEO_HIGHLIGHTS_IFRAME_TOP_WIDTH =                 520;    var LEO_HIGHLIGHTS_IFRAME_TOP_HEIGHT =                294;        var LEO_HIGHLIGHTS_IFRAME_BOTTOM_POS_X =              96;    var LEO_HIGHLIGHTS_IFRAME_BOTTOM_POS_Y =              294;    var LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_WIDTH =    425;    var LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_HEIGHT =   97;    var LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_WIDTH =     425;    var LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_HEIGHT =    371;              var LEO_HIGHLIGHTS_SHOW_DELAY_MS =                    300;    var LEO_HIGHLIGHTS_HIDE_DELAY_MS =                    750;    var LEO_HIGHLIGHTS_SHOW_DELAY_NO_UNDER_MS =           850;        var LEO_HIGHLIGHTS_BACKGROUND_STYLE_DEFAULT =         "transparent none repeat scroll 0% 0%";    var LEO_HIGHLIGHTS_BACKGROUND_STYLE_HOVER =           "rgb(245, 245, 0) none repeat scroll 0% 0%";    var LEO_HIGHLIGHTS_ROVER_TAG =                        "711-36858-13496-14";     createInlineScriptElement("var%20LEO_HIGHLIGHTS_DEBUG%20%3D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20false%3B%0Avar%20LEO_HIGHLIGHTS_DEBUG_POS%20%3D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20false%3B%0A%20%20%20%0Avar%20_leoHighlightsPrevElem%20%3D%20null%3B%0Avar%20_leoHighlightsSnoozed%20%3D%20false%3B%0A%0A/**%0A%20*%20Checks%20if%20the%20passed%20in%20class%20exists%0A%20*%20@param%20c%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsClassExists%28c%29%20%7B%0A%20%20%20return%20typeof%28c%29%20%3D%3D%20%22function%22%20%26%26%20typeof%28c.prototype%29%20%3D%3D%20%22object%22%20?%20true%20%3A%20false%3B%0A%7D%0A%0A/**%0A%20*%20Checks%20if%20the%20firebug%20console%20is%20available%0A%20*%20@param%20c%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsFirebugConsoleAvailable%28c%29%20%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsClassExists%28_FirebugConsole%29%20%26%26%20%0A%20%20%20%20%20%20%20%20%20window.console%20%26%26%20console.log%20%26%26%20%0A%20%20%20%20%20%20%20%20%20%28console%20instanceof%20_FirebugConsole%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%7D%0A%20%20%20catch%28e%29%7B%7D%0A%20%20%20%0A%20%20%20return%20false%3B%0A%7D%20%0A%0A%0A/**%0A%20*%20General%20method%20used%20to%20debug%20exceptions%0A%20*%20%0A%20*%20@param%20location%0A%20*%20@param%20e%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsReportExeception%28location%2Ce%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsFirebugConsoleAvailable%28%29%20||LEO_HIGHLIGHTS_DEBUG%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20var%20logString%3Dlocation%2B%22%3A%20%22%2Be%2B%22%5Cn%5Ct%22%2Be.name%2B%22%5Cn%5Ct%22%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28e.number%260xFFFF%29%2B%22%5Cn%5Ct%22%2Be.description%3B%0A%20%20%20%20%20%20%20%20%20if%28_leoHighlightsFirebugConsoleAvailable%28%29%29%0A%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20console.error%28logString%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20console.trace%28%29%3B%0A%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28LEO_HIGHLIGHTS_DEBUG%29%0A%20%20%20%20%20%20%20%20%20alert%28logString%29%3B%20%20%20%20%20%20%0A%20%20%20%7D%0A%20%20%20catch%28e%29%7B%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20log%20a%20string%20to%20the%20firebug%20console%0A%20*%20%0A%20*%20@param%20str%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsDebugLog%28str%29%0A%7B%20%20%20%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsFirebugConsoleAvailable%28%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20console.log%28typeof%28_FirebugConsole%29%2B%22%20%22%2Bstr%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22_leoHighlightsDebugLog%28%29%20%22%2Bstr%2Ce%29%3B%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20get%20an%20attribute%20and%20decode%20it.%0A%20*%20%0A%20*%20@param%20elem%0A%20*%20@param%20id%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsGetAttrib%28elem%2Cid%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20var%20val%3Delem.getAttribute%28id%29%3B%0A%20%20%20%20%20%20return%20decodeURI%28val%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22_leoHighlightsGetAttrib%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%20%7D%0A%20%20%20return%20null%3B%0A%7D%0A%0A/**%0A%20*%20Checks%20if%20this%20is%20within%20a%20frame%20by%20checking%20for%20a%20parent.%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsIsFrame%28%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%20%20%0A%20%20%20%20%20%20return%20%28window%21%3Dtop%29%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22_leoHighlightsIsFrame%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%20%20%0A%20%20%20return%20false%3B%0A%7D%0A%0A/**%0A%20*%20This%20is%20a%20dimensions%20object%0A%20*%20%0A%20*%20@param%20width%0A%20*%20@param%20height%0A%20*%20@return%0A%20*/%0Afunction%20LeoHighlightsDimension%28width%2Cheight%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09this.width%3Dwidth%3B%0A%20%20%20%09this.height%3Dheight%3B%0A%20%20%20%09this.toString%3Dfunction%28%29%20%7B%20return%20%28%22%28%22%2Bthis.width%2B%22%2C%22%2Bthis.height%2B%22%29%22%29%3B%7D%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22new%20LeoHighlightsDimension%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A%20*%20This%20is%20a%20Position%20object%0A%20*%20%0A%20*%20@param%20x%0A%20*%20@param%20y%0A%20*%20@return%0A%20*/%0Afunction%20LeoHighlightsPosition%28x%2Cy%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09this.x%3Dx%3B%0A%20%20%20%09this.y%3Dy%3B%0A%20%20%20%09this.toString%3Dfunction%28%29%20%7B%20return%20%28%22%28%22%2Bthis.x%2B%22%2C%22%2Bthis.y%2B%22%29%22%29%3B%7D%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22new%20LeoHighlightsPosition%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0Avar%20LEO_HIGHLIGHTS_ADJUSTMENT%20%3D%20new%20LeoHighlightsPosition%283%2C3%29%3B%0Avar%20LEO_HIGHLIGHTS_IFRAME_TOP_SIZE%20%3D%20new%20LeoHighlightsDimension%28LEO_HIGHLIGHTS_IFRAME_TOP_WIDTH%2CLEO_HIGHLIGHTS_IFRAME_TOP_HEIGHT%29%3B%0Avar%20LEO_HIGHLIGHTS_IFRAME_BOTTOM_HOVER_SIZE%20%3D%20new%20LeoHighlightsDimension%28LEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_WIDTH%2CLEO_HIGHLIGHTS_IFRAME_BOTTOM_COLLAPSED_HEIGHT%29%3B%0Avar%20LEO_HIGHLIGHTS_IFRAME_BOTTOM_CLICK_SIZE%20%3D%20new%20LeoHighlightsDimension%28LEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_WIDTH%2CLEO_HIGHLIGHTS_IFRAME_BOTTOM_EXPANDED_HEIGHT%29%3B%0A%0Avar%20LEO_HIGHLIGHTS_DIV_HOVER_SIZE%20%3D%20new%20LeoHighlightsDimension%28LEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_WIDTH%2CLEO_HIGHLIGHTS_IFRAME_TOTAL_COLLAPSED_HEIGHT%29%3B%0Avar%20LEO_HIGHLIGHTS_DIV_CLICK_SIZE%20%3D%20new%20LeoHighlightsDimension%28LEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_WIDTH%2CLEO_HIGHLIGHTS_IFRAME_TOTAL_EXPANDED_HEIGHT%29%3B%0A%0A%0A/**%0A%20*%20Sets%20the%20size%20of%20the%20passed%20in%20element%0A%20*%20%0A%20*%20@param%20elem%0A%20*%20@param%20dim%20%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsSetSize%28elem%2Cdim%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09//%20Set%20the%20popup%20location%0A%20%20%20%09elem.style.width%20%3D%20dim.width%20%2B%20%22px%22%3B%0A%20%20%20%09if%28elem.width%29%0A%20%20%20%09%09elem.width%3Ddim.width%3B%0A%20%20%20%09elem.style.height%20%20%3D%20dim.height%20%2B%20%22px%22%3B%0A%20%20%20%09if%28elem.height%29%0A%20%20%20%09%09elem.height%3Ddim.height%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsSetSize%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A%20*%20This%20can%20be%20used%20for%20a%20simple%20one%20argument%20callback%0A%20*%0A%20*%20@param%20callName%0A%20*%20@param%20argName%0A%20*%20@param%20argVal%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsSimpleGwCallBack%28callName%2CargName%2C%20argVal%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20if%28argName%29%0A%20%20%20%20%20%20%09gwObj.addParam%28argName%2CargVal%29%3B%0A%20%20%20%20%20%20gwObj.callName%28callName%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsSimpleGwCallBack%28%29%20%22%2BcallName%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20gets%20a%20url%20argument%20from%20the%20current%20document.%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsGetUrlArg%28url%2C%20name%20%29%0A%7B%0A%09%20%20name%20%3D%20name.replace%28/[%5C[]/%2C%22%5C%5C%5C[%22%29.replace%28/[%5C]]/%2C%22%5C%5C%5C]%22%29%3B%0A%09%20%20var%20regexS%20%3D%20%22[%5C%5C?%26]%22%2Bname%2B%22%3D%28[^%26%23]*%29%22%3B%0A%09%20%20var%20regex%20%3D%20new%20RegExp%28%20regexS%20%29%3B%0A%09%20%20var%20results%20%3D%20regex.exec%28url%29%3B%0A%09%20%20if%28%20results%20%3D%3D%20null%20%29%0A%09%20%20%20%20return%20%22%22%3B%0A%09%20%20else%0A%09%20%20%20%20return%20results[1]%3B%0A%7D%0A%0A%0A/**%0A%20*%20This%20allows%20to%20redirect%20the%20top%20window%20to%20the%20passed%20in%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsRedirectTop%28url%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%20%20%09%0A%20%20%20%09top.location%3Durl%3B%09%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsRedirectTop%28%29%22%2Ce%29%3B%0A%20%20%20%7D%0A%7D%0A%0A%0A/**%0A%20*%20This%20will%20find%20an%20element%20by%20Id%0A%20*%20%0A%20*%20@param%20elemId%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsFindElementById%28elemId%2Cdoc%29%0A%7B%0A%09try%0A%09%7B%0A%09%20%20%20if%28doc%3D%3Dnull%29%0A%09%20%20%20%20%20%20doc%3Ddocument%3B%0A%09%20%20%20%0A%09%09var%20elem%3Ddoc.getElementById%28elemId%29%3B%0A%09%09if%28elem%29%0A%09%09%09return%20elem%3B%0A%09%09%0A%09%09/*%20This%20is%20the%20handling%20for%20IE%20*/%0A%09%09if%28doc.all%29%0A%09%09%7B%0A%09%09%09elem%3Ddoc.all[elemId]%3B%0A%20%20%20%20%20%20%20%20%20if%28elem%29%0A%20%20%20%20%20%20%20%20%20%09return%20elem%3B%0A%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20for%20%28%20var%20i%20%3D%20%28document.all.length-1%29%3B%20i%20%3E%3D%200%3B%20i--%29%20%7B%0A%20%20%20%20%20%20%20%20%20%09elem%3Ddoc.all[i]%3B%0A%20%20%20%20%20%20%20%20%20%09if%28elem.id%3D%3DelemId%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20elem%3B%0A%20%20%20%20%20%20%20%20%20%7D%0A%09%09%7D%0A%09%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsFindElementById%28%29%22%2Ce%29%3B%0A%20%20%20%7D%0A%09return%20null%3B%0A%7D%0A%0A/**%0A%20*%20Get%20the%20location%20of%20one%20element%20relative%20to%20a%20parent%20reference%0A%20*%0A%20*%20@param%20ref%0A%20*%20%20%20%20%20%20%20%20%20%20%20the%20reference%20element%2C%20this%20must%20be%20a%20parent%20of%20the%20passed%20in%0A%20*%20%20%20%20%20%20%20%20%20%20%20element%0A%20*%20@param%20elem%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsGetLocation%28ref%2C%20elem%29%20%7B%0A%20%20%20_leoHighlightsDebugLog%28%22_leoHighlightsGetLocation%20%22%2Belem.id%29%3B%0A%20%20%20%0A%20%20%20var%20count%20%3D%200%3B%0A%20%20%20var%20location%20%3D%20new%20LeoHighlightsPosition%280%2C0%29%3B%0A%20%20%20var%20walk%20%3D%20elem%3B%0A%20%20%20while%20%28walk%20%21%3D%20null%20%26%26%20walk%20%21%3D%20ref%20%26%26%20count%20%3C%20LEO_HIGHLIGHTS_INFINITE_LOOP_COUNT%29%20%7B%0A%20%20%20%20%20%20location.x%20%2B%3D%20walk.offsetLeft%3B%0A%20%20%20%20%20%20location.y%20%2B%3D%20walk.offsetTop%3B%0A%20%20%20%20%20%20walk%20%3D%20walk.offsetParent%3B%0A%20%20%20%20%20%20count%2B%2B%3B%0A%20%20%20%7D%0A%20%20%20%0A%20%20%20_leoHighlightsDebugLog%28%22Location%20is%3A%20%22%2Belem.id%2B%22%20-%20%22%2Blocation%29%3B%0A%0A%20%20%20return%20location%3B%0A%7D%0A%0A/**%0A%20*%20This%20is%20used%20to%20update%20the%20position%20of%20an%20element%20as%20a%20popup%0A%20*%20%0A%20*%20@param%20IFrame%0A%20*%20@param%20anchor%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsUpdatePopupPos%28iFrame%2Canchor%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20//%20Gets%20the%20scrolled%20location%20for%20x%20and%20y%0A%20%20%20%20%20%20var%20scrolledPos%3Dnew%20LeoHighlightsPosition%280%2C0%29%3B%0A%20%20%20%20%20%20if%28%20self.pageYOffset%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20scrolledPos.x%20%3D%20self.pageXOffset%3B%0A%20%20%20%20%20%20%20%20%20scrolledPos.y%20%3D%20self.pageYOffset%3B%0A%20%20%20%20%20%20%7D%20else%20if%28%20document.documentElement%20%26%26%20document.documentElement.scrollTop%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20scrolledPos.x%20%3D%20document.documentElement.scrollLeft%3B%0A%20%20%20%20%20%20%20%20%20scrolledPos.y%20%3D%20document.documentElement.scrollTop%3B%0A%20%20%20%20%20%20%7D%20else%20if%28%20document.body%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20scrolledPos.x%20%3D%20document.body.scrollLeft%3B%0A%20%20%20%20%20%20%20%20%20scrolledPos.y%20%3D%20document.body.scrollTop%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Get%20the%20total%20dimensions%20to%20see%20what%20scroll%20bars%20might%20be%20active%20*/%0A%20%20%20%20%20%20var%20totalDim%3Dnew%20LeoHighlightsDimension%280%2C0%29%0A%20%20%20%20%20%20if%20%28document.all%20%26%26%20document.documentElement%20%26%26%20%0A%20%20%20%20%20%20%09document.documentElement.clientHeight%26%26document.documentElement.clientWidth%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%09totalDim.width%20%3D%20document.documentElement.scrollWidth%3B%0A%20%20%20%20%20%20%09totalDim.height%20%3D%20document.documentElement.scrollHeight%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%20if%20%28document.all%29%0A%20%20%20%20%20%20%7B%20/*%20This%20is%20in%20IE%20*/%0A%20%20%20%20%20%09%20%09totalDim.width%20%3D%20document.body.scrollWidth%3B%0A%20%20%20%20%20%20%09totalDim.height%20%3D%20document.body.scrollHeight%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%09%20totalDim.width%20%3D%20document.width%3B%0A%20%20%20%20%20%20%09%20totalDim.height%20%3D%20document.height%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20//%20Gets%20the%20location%20of%20the%20available%20screen%20space%0A%20%20%20%20%20%20var%20centerDim%3Dnew%20LeoHighlightsDimension%280%2C0%29%3B%0A%20%20%20%20%20%20if%28self.innerWidth%20%26%26%20self.innerHeight%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20centerDim.width%20%3D%20self.innerWidth-%28totalDim.height%3Eself.innerHeight?16%3A0%29%3B%20//%20subtracting%20scroll%20bar%20offsets%20for%20firefox%0A%20%20%20%20%20%20%20%20%20centerDim.height%20%3D%20self.innerHeight-%28totalDim.width%3Eself.innerWidth?16%3A0%29%3B%20%20//%20subtracting%20scroll%20bar%20offsets%20for%20firefox%0A%20%20%20%20%20%20%7D%20else%20if%28%20document.documentElement%20%26%26%20document.documentElement.clientHeight%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20centerDim.width%20%3D%20document.documentElement.clientWidth%3B%0A%20%20%20%20%20%20%20%20%20centerDim.height%20%3D%20document.documentElement.clientHeight%3B%0A%20%20%20%20%20%20%7D%20else%20if%28%20document.body%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20centerDim.width%20%3D%20document.body.clientWidth%3B%0A%20%20%20%20%20%20%20%20%20centerDim.height%20%3D%20document.body.clientHeight%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20//%20Get%20the%20current%20dimension%20of%20the%20popup%20element%0A%20%20%20%20%20%20var%20iFrameDim%3Dnew%20LeoHighlightsDimension%28iFrame.offsetWidth%2CiFrame.offsetHeight%29%0A%20%20%20%20%20%20if%20%28iFrameDim.width%20%3C%3D%200%29%0A%20%20%20%20%20%20%09iFrameDim.width%20%3D%20iFrame.style.width.substring%280%2C%20iFrame.style.width.indexOf%28%27px%27%29%29%3B%0A%20%20%20%20%20%20if%20%28iFrameDim.height%20%3C%3D%200%29%0A%20%20%20%20%20%20%09iFrameDim.height%20%3D%20iFrame.style.height.substring%280%2C%20iFrame.style.height.indexOf%28%27px%27%29%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Calculate%20the%20position%2C%20lower%20right%20hand%20corner%20by%20default%20*/%0A%20%20%20%20%20%20var%20position%3Dnew%20LeoHighlightsPosition%280%2C0%29%3B%0A%20%20%20%20%20%20position.x%3DscrolledPos.x%2BcenterDim.width-iFrameDim.width-LEO_HIGHLIGHTS_ADJUSTMENT.x%3B%0A%20%20%20%20%20%20position.y%3DscrolledPos.y%2BcenterDim.height-iFrameDim.height-LEO_HIGHLIGHTS_ADJUSTMENT.y%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28anchor%21%3Dnull%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20//centerDim%20in%20relation%20to%20the%20anchor%20element%20if%20available%0A%20%20%20%20%20%20%20%20%20var%20topOrBottom%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20%20var%20anchorPos%3D_leoHighlightsGetLocation%28document.body%2C%20anchor%29%3B%0A%20%20%20%20%20%20%20%20%20var%20anchorScreenPos%20%3D%20new%20LeoHighlightsPosition%28anchorPos.x-scrolledPos.x%2CanchorPos.y-scrolledPos.y%29%3B%0A%20%20%20%20%20%20%20%20%20var%20anchorDim%3Dnew%20LeoHighlightsDimension%28anchor.offsetWidth%2Canchor.offsetHeight%29%0A%20%20%20%20%20%20%20%20%20if%20%28anchorDim.width%20%3C%3D%200%29%0A%20%20%20%20%20%20%20%20%20%09anchorDim.width%20%3D%20anchor.style.width.substring%280%2C%20anchor.style.width.indexOf%28%27px%27%29%29%3B%0A%20%20%20%20%20%20%20%20%20if%20%28anchorDim.height%20%3C%3D%200%29%0A%20%20%20%20%20%20%20%20%20%09anchorDim.height%20%3D%20anchor.style.height.substring%280%2C%20anchor.style.height.indexOf%28%27px%27%29%29%3B%0A%0A%20%20%20%20%20%20%20%20%20//%20Check%20if%20the%20popup%20can%20be%20shown%20above%20or%20below%20the%20element%0A%20%20%20%20%20%20%20%20%20if%20%28centerDim.height%20-%20anchorDim.height%20-%20iFrameDim.height%20-%20anchorScreenPos.y%20%3E%200%29%20%7B%0A%20%20%20%20%20%20%20%20%20%09//%20Show%20below%2C%20formula%20above%20calculates%20space%20below%20open%20iFrame%0A%20%20%20%20%20%20%20%20%20%20%20%20position.y%20%3D%20anchorPos.y%20%2B%20anchorDim.height%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20topOrBottom%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%7D%20else%20if%20%28anchorScreenPos.y%20-%20anchorDim.height%20-%20iFrameDim.height%20%3E%200%29%20%7B%0A%20%20%20%20%20%20%20%20%20%09//%20Show%20above%2C%20formula%20above%20calculates%20space%20above%20open%20iFrame%0A%20%20%20%20%20%20%20%20%20%09position.y%20%3D%20anchorPos.y%20-%20iFrameDim.height%20-%20anchorDim.height%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20topOrBottom%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20_leoHighlightsDebugLog%28%22_leoHighlightsUpdatePopupPos%28%29%20-%20topOrBottom%3A%20%22%2BtopOrBottom%29%3B%0A%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20if%20%28topOrBottom%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20//%20We%20attempt%20top%20attach%20the%20window%20to%20the%20element%0A%20%20%20%20%20%20%20%20%20%09position.x%20%3D%20anchorPos.x%20-%20iFrameDim.width%20/%202%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28position.x%20%3C%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%09position.x%20%3D%200%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20if%20%28position.x%20%2B%20iFrameDim.width%20%3E%20scrolledPos.x%20%2B%20centerDim.width%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%09position.x%20%3D%20scrolledPos.x%20%2B%20centerDim.width%20-%20iFrameDim.width%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsDebugLog%28%22_leoHighlightsUpdatePopupPos%28%29%20-%20topOrBottom%3A%20%22%2Bposition%29%3B%0A%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20//%20Attempt%20to%20align%20on%20the%20right%20or%20left%20hand%20side%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28centerDim.width%20-%20anchorDim.width%20-%20iFrameDim.width%20-%20anchorScreenPos.x%20%3E%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20position.x%20%3D%20anchorPos.x%20%2B%20anchorDim.width%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20if%20%28anchorScreenPos.x%20-%20anchorDim.width%20-%20iFrameDim.width%20%3E%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%09position.x%20%3D%20anchorPos.x%20-%20anchorDim.width%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20%20//%20default%20to%20below%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20position.y%20%3D%20anchorPos.y%20%2B%20anchorDim.height%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsDebugLog%28%22_leoHighlightsUpdatePopupPos%28%29%20-%20sideBottom%3A%20%22%2Bposition%29%3B%0A%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Make%20sure%20that%20we%20don%27t%20go%20passed%20the%20right%20hand%20border%20*/%0A%20%20%20%20%20%20if%28position.x%2BiFrameDim.width%3EcenterDim.width-20%29%0A%20%20%20%20%20%20%09position.x%3DcenterDim.width-%28iFrameDim.width%2B20%29%3B%0A%20%20%20%20%20%20%09%09%0A%20%20%20%20%20%20//%20Make%20sure%20that%20we%20didn%27t%20go%20passed%20the%20start%0A%20%20%20%20%20%20if%28position.x%3C0%29%0A%20%20%20%20%20%20%20%20%20position.x%3D0%3B%0A%20%20%20%20%20%20if%28position.y%3C0%29%0A%20%20%20%20%20%20%09position.y%3D0%3B%0A%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22Popup%20info%20id%3A%20%20%20%20%20%20%20%22%20%2BiFrame.id%2B%22%20-%20%22%2Banchor.id%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5Cnscrolled%20%20%20%20%20%20%20%20%20%20%22%20%2B%20scrolledPos%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5Cncenter/visible%20%20%20%20%22%20%2B%20centerDim%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5Cnanchor%20%28absolute%29%20%22%20%2B%20anchorPos%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5Cnanchor%20%28screen%29%20%20%20%22%20%2B%20anchorScreenPos%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5CnSize%20%28anchor%29%20%20%20%20%20%22%20%2B%20anchorDim%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5CnSize%20%28popup%29%20%20%20%20%20%20%22%20%2B%20iFrameDim%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2B%20%22%5CnResult%20pos%20%20%20%20%20%20%20%20%22%20%2B%20position%29%3B%0A%0A%20%20%20%20%20%20//%20Set%20the%20popup%20location%0A%20%20%20%20%20%20iFrame.style.left%20%3D%20position.x%20%2B%20%22px%22%3B%0A%20%20%20%20%20%20iFrame.style.top%20%20%3D%20position.y%20%2B%20%22px%22%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsUpdatePopupPos%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A%0A/**%0A%20*%20This%20will%20show%20the%20passed%20in%20element%20as%20a%20popup%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@param%20size%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsShowPopup%28anchorId%2Csize%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsSnoozed%29%0A%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%0A%20%20%20%09var%20popup%3Dnew%20LeoHighlightsPopup%28anchorId%2Csize%29%3B%0A%20%20%20%09popup.show%28%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsShowPopup%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A%0A/**%0A%20*%20This%20will%20transform%20the%20passed%20in%20url%20to%20a%20rover%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsGetRoverUrl%28url%29%0A%7B%0A%09var%20rover%3DLEO_HIGHLIGHTS_ROVER_TAG%3B%0A%09var%20roverUrl%3D%22http%3A//rover.ebay.com/rover/1/%22%2Brover%2B%22/4?%26mpre%3D%22%2BencodeURI%28url%29%3B%0A%09%0A%09return%20roverUrl%3B%0A%7D%0A%0A/**%0A%20*%20Sets%20the%20size%20of%20the%20bottom%20windown%20part%0A%20*%20%0A%20*%20@param%20size%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsSetBottomSize%28size%2CclickId%29%0A%7B%0A%20%20%20/*%20Get%20the%20elements%20*/%0A%20%20%20var%20iFrameBottom%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID%29%3B%0A%20%20%20var%20iFrameDiv%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_DIV_ID%29%3B%0A%0A%20%20%20/*%20Figure%20out%20the%20correct%20sizes%20*/%0A%20%20%20var%20iFrameBottomSize%3D%28size%3D%3D1%29?LEO_HIGHLIGHTS_IFRAME_BOTTOM_CLICK_SIZE%3ALEO_HIGHLIGHTS_IFRAME_BOTTOM_HOVER_SIZE%3B%0A%20%20%20var%20divSize%3D%28size%3D%3D1%29?LEO_HIGHLIGHTS_DIV_CLICK_SIZE%3ALEO_HIGHLIGHTS_DIV_HOVER_SIZE%3B%0A%0A%20%20%20/*%20Refresh%20the%20iFrame%27s%20url%2C%20by%20removing%20the%20size%20arg%20and%20adding%20it%20again%20*/%0A%20%20%20leoHighlightsUpdateUrl%28iFrameBottom%2Csize%2CclickId%29%3B%0A%0A%20%20%20/*%20Clear%20the%20hover%20flag%2C%20if%20the%20user%20shows%20this%20at%20full%20size%20*/%0A%20%20%20_leoHighlightsPrevElem.hover%3Dsize%3D%3D1?false%3Atrue%3B%0A%0A%20%20%20_leoHighlightsSetSize%28iFrameBottom%2CiFrameBottomSize%29%3B%0A%20%20%20_leoHighlightsSetSize%28iFrameDiv%2CdivSize%29%3B%0A%7D%0A%0A/**%0A%20*%20Class%20for%20a%20Popup%20%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@param%20size%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20LeoHighlightsPopup%28anchorId%2Csize%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22LeoHighlightsPopup%28%29%20%22%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%09this.anchorId%3DanchorId%3B%0A%20%20%20%09this.anchor%3D_leoHighlightsFindElementById%28this.anchorId%29%3B%0A%20%20%20%09this.topIframe%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_TOP_ID%29%3B%0A%20%20%20%20%20%20this.bottomIframe%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID%29%3B%0A%20%20%20%09this.iFrameDiv%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_DIV_ID%29%3B%0A%20%20%20%09%0A%20%20%20%09this.topIframe.src%3Dunescape%28this.anchor.getAttribute%28%27leoHighlights_url_top%27%29%29%3B%3B%0A%20%20%20%20%20%20this.bottomIframe.src%3Dunescape%28this.anchor.getAttribute%28%27leoHighlights_url_bottom%27%29%29%3B%3B%0A%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%221%29%20LeoHighlightsPopup%28%29%20%28%22%2Bthis.topIframe.style.top%2B%22%2C%20%22%2Bthis.topIframe.style.left%2B%22%29%22%29%3B%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%222%29%20LeoHighlightsPopup%28%29%20%28%22%2Bthis.bottomIframe.style.top%2B%22%2C%20%22%2Bthis.bottomIframe.style.left%2B%22%29%22%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%09leoHighlightsSetSize%28size%29%3B%0A%20%20%20%09%0A%20%20%20%09this.updatePos%3Dfunction%28%29%20%7B%20_leoHighlightsUpdatePopupPos%28this.iFrameDiv%2Cthis.anchor%29%3B%7D%3B%0A%20%20%20%20%20%20this.show%3Dfunction%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.updatePos%28%29%3B%20%0A%20%20%20%20%20%20%20%20%20%20%20%20this.iFrameDiv.style.visibility%20%3D%20%22visible%22%3B%20%0A%20%20%20%20%20%20%20%20%20%20%20%20this.iFrameDiv.style.display%20%3D%20%22block%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.updatePos%28%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsDebugLog%28%223%29%20LeoHighlightsPopup%28%29%20%28%22%2Bthis.topIframe.style.top%2B%22%2C%20%22%2Bthis.topIframe.style.left%2B%22%29%22%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsDebugLog%28%224%29%20LeoHighlightsPopup%28%29%20%28%22%2Bthis.bottomIframe.style.top%2B%22%2C%20%22%2Bthis.bottomIframe.style.left%2B%22%29%22%29%3B%0A%20%20%20%20%20%20%7D%3B%20%20%20%20%20%20%20%0A%20%20%20%09this.scroll%3Dfunction%28%29%20%7B%20this.updatePos%28%29%3B%7D%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22new%20LeoHighlightsPopup%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20updates%20the%20url%20for%20the%20iFrame%0A%20*%20%0A%20*%20@param%20iFrame%0A%20*%20@param%20size%0A%20*%20@param%20clickId%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsUpdateUrl%28iFrame%2Csize%2CclickId%2CdestUrl%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsUpdateUrl%28%29%20%22%2BdestUrl%29%3B%0A%20%20%20%20%20%20var%20url%3DiFrame.src%3B%0A%20%20%20%20%20%20var%20idx%3Durl.indexOf%28%22%26size%3D%22%29%3B%0A%20%20%20%20%20%20if%28idx%3E%3D0%29%0A%20%20%20%20%20%20%20%20%20url%3Durl.substring%280%2Cidx%29%3B%0A%20%20%20%20%20%20%0A//%20%20%20%20%20%20size%3D1%3B%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsUpdateUrl%28%29%20size%3D%22%2Bsize%2B%22%20%20%22%2Burl%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28size%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20url%2B%3D%28%22%26size%3D%22%2Bsize%29%3B%0A%20%20%20%20%20%20if%28clickId%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20url%2B%3D%28%22%26clickId%3D%22%2BclickId%29%3B%0A%20%20%20%20%20%20if%28destUrl%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20url%2B%3D%28%22%26url%3D%22%2BdestUrl%29%3B%0A%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsUpdateUrl%28%29%20%22%2Burl%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20iFrame.src%3Durl%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsUpdateUrl%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A%0A%0A/**%0A*%0A*%20This%20can%20be%20used%20to%20close%20an%20iframe%0A*%0A*%20@param%20id%0A*%20@return%0A*/%0Afunction%20leoHighlightsSetSize%28size%2CclickId%29%0A%7B%0A%09try%0A%09%7B%0A%09%09/*%20Get%20the%20element%20*/%0A%20%20%09%09var%20iFrameTop%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_TOP_ID%29%3B%0A%0A%20%20%09%09/*%20Figure%20out%20the%20correct%20sizes%20*/%0A%20%20%09%09var%20iFrameTopSize%3DLEO_HIGHLIGHTS_IFRAME_TOP_SIZE%3B%0A%20%20%09%09%0A%20%20%09%09/*%20Refresh%20the%20iFrame%27s%20url%2C%20by%20removing%20the%20size%20arg%20and%20adding%20it%20again%20*/%0A%20%20%09%09leoHighlightsUpdateUrl%28iFrameTop%2Csize%2CclickId%29%3B%0A%20%20%09%09%0A%20%20%09%09_leoHighlightsSetSize%28iFrameTop%2CiFrameTopSize%29%3B%0A%20%20%20%20%20%20_leoHighlightsSetBottomSize%28size%2CclickId%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Clear%20the%20hover%20flag%2C%20if%20the%20user%20shows%20this%20at%20full%20size%20*/%0A%20%20%20%20%20%20if%28size%3D%3D1%26%26_leoHighlightsPrevElem%29%0A%20%20%20%20%20%20%20%20%20_leoHighlightsPrevElem.hover%3Dfalse%3B%20%20%20%20%20%20%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsSetSize%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A%20*%20Start%20the%20popup%20a%20little%20bit%20delayed.%0A%20*%20Somehow%20IE%20needs%20some%20time%20to%20find%20the%20element%20by%20id.%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@param%20size%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsShowPopup%28anchorId%2Csize%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsSnoozed%29%0A%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%0A%20%20%09%09var%20elem%3D_leoHighlightsFindElementById%28anchorId%29%3B%0A%20%20%09%09if%28_leoHighlightsPrevElem%26%26%28_leoHighlightsPrevElem%21%3Delem%29%29%0A%20%20%09%09%09_leoHighlightsPrevElem.shown%3Dfalse%3B%0A%20%20%09%09elem.shown%3Dtrue%3B%0A%09%09_leoHighlightsPrevElem%3Delem%3B%0A%09%09%0A%09%09_leoHighlightsDebugLog%28%22leoHighlightsShowPopup%28%29%20%22%2B_leoHighlightsPrevElem%29%3B%09%09%0A%20%20%20%09%0A%20%20%20%09/*%20FF%20needs%20to%20find%20the%20element%20first%20*/%0A%20%20%20%09_leoHighlightsFindElementById%28anchorId%29%3B%0A%20%20%20%09%0A%20%20%20%09setTimeout%28%22_leoHighlightsShowPopup%28%5C%27%22%2BanchorId%2B%22%5C%27%2C%5C%27%22%2Bsize%2B%22%5C%27%29%3B%22%2C10%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHighlightsShowPopup%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A*%0A*%20This%20can%20be%20used%20to%20close%20an%20iframe%0A*%0A*%20@param%20id%0A*%20@return%0A*/%0Afunction%20leoHighlightsHideElem%28id%29%0A%7B%0A%09try%0A%09%7B%0A%09%09/*%20Get%20the%20appropriate%20sizes%20*/%0A%20%20%09%09var%20elem%3D_leoHighlightsFindElementById%28id%29%3B%0A%20%20%09%09if%28elem%29%0A%20%20%09%09%09elem.style.visibility%3D%22hidden%22%3B%0A%20%20%09%09%0A%20%20%09%09/*%20Clear%20the%20page%20for%20the%20next%20run%20through%20*/%0A%20%20%09%09var%20iFrame%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_TOP_ID%29%3B%0A%20%20%09%09if%28iFrame%29%0A%20%20%09%09%09iFrame.src%3D%22about%3Ablank%22%3B%0A%20%20%20%20%20%20var%20iFrame%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID%29%3B%0A%20%20%20%20%20%20if%28iFrame%29%0A%20%20%20%20%20%20%20%20%20iFrame.src%3D%22about%3Ablank%22%3B%0A%20%20%09%09%0A%20%20%09%09%0A%20%20%09%09if%28_leoHighlightsPrevElem%29%0A%20%20%09%09%7B%0A%20%20%09%09%09_leoHighlightsPrevElem.shown%3Dfalse%3B%0A%20%20%09%09%09_leoHighlightsPrevElem%3Dnull%3B%0A%20%20%09%09%7D%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHideElem%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A*%0A*%20This%20can%20be%20used%20to%20close%20an%20iframe.%0A*%20Since%20the%20iFrame%20is%20reused%20the%20frame%20only%20gets%20hidden%0A*%0A*%20@return%0A*/%0Afunction%20leoHighlightsIFrameClose%28%29%0A%7B%0A%20%20try%0A%20%20%7B%0A%09%20%20_leoHighlightsSimpleGwCallBack%28%22LeoHighlightsHideIFrame%22%29%3B%0A%20%20%7D%0A%20%20catch%28e%29%0A%20%20%7B%0A%09%20%20_leoHighlightsReportExeception%28%22leoHighlightsIFrameClose%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%7D%0A%7D%0A%0A/**%0A*%0A*%20This%20is%20used%20to%20snooze%20the%20highlights.%0A*%0A*%20@return%0A*/%0Afunction%20leoHighlightsSnooze%28%29%0A%7B%0A%20%20try%0A%20%20%7B%0A%20%20%20%20%20_leoHighlightsSnoozed%3Dtrue%3B%0A%20%20%20%20%20_leoHighlightsSimpleGwCallBack%28%22LeoHighlightsSnooze%22%29%3B%0A%20%20%7D%0A%20%20catch%28e%29%0A%20%20%7B%0A%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsSnooze%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%7D%0A%7D%0A%0A/**%0A*%0A*%20This%20is%20used%20to%20snooze%20the%20highlights.%0A*%20This%20gets%20fired%20into%20the%20top%20frame.%0A*%0A*%20@return%0A*/%0Afunction%20leoHighlightsSnoozeTop%28id%29%0A%7B%0A%20%20try%0A%20%20%7B%0A%20%20%20%20%20_leoHighlightsSnoozed%3Dtrue%3B%0A%20%20%20%20%20leoHighlightsHideElem%28id%29%3B%0A%20%20%7D%0A%20%20catch%28e%29%0A%20%20%7B%0A%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsSnoozeTop%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%7D%0A%7D%0A%0A%0A/**%0A%20*%20This%20should%20handle%20the%20click%20events%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleClick%28anchorId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsSnoozed%29%0A%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28_leoHighlightsIsFrame%28%29%29%0A%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%0A%20%20%09%09var%20anchor%3D_leoHighlightsFindElementById%28anchorId%29%3B%0A%20%20%09%09anchor.hover%3Dfalse%3B%0A%20%20%09%09if%28anchor.startTimer%29%0A%20%20%09%09%09clearTimeout%28anchor.startTimer%29%3B%0A%20%20%20%09%0A%20%20%20%20%20%20/*%20Report%20the%20click%20event%20*/%0A%20%20%20%20%20%20leoHighlightsReportEvent%28%22clicked%22%2C%20window.document.domain%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsGetAttrib%28anchor%2C%27leohighlights_keywords%27%29%2Cnull%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsGetAttrib%28anchor%2C%27leohighlights_accept%27%29%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsGetAttrib%28anchor%2C%27leohighlights_reject%27%29%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%09leoHighlightsShowPopup%28anchorId%2C1%29%3B%0A%20%20%20%09return%20false%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHighlightsHandleClick%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A%20*%20This%20should%20handle%20the%20hover%20events%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleHover%28anchorId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20if%28_leoHighlightsSnoozed%29%0A%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28_leoHighlightsIsFrame%28%29%29%0A%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%0A%20%20%09%09var%20anchor%3D_leoHighlightsFindElementById%28anchorId%29%3B%0A%20%20%09%09anchor.hover%3Dtrue%3B%0A%20%20%09%09%0A%20%20%20%20%20%20/*%20Report%20the%20hover%20event%20*/%0A%20%20%20%20%20%20leoHighlightsReportEvent%28%22hovered%22%2C%20window.document.domain%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsGetAttrib%28anchor%2C%27leohighlights_keywords%27%29%2Cnull%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsGetAttrib%28anchor%2C%27leohighlights_accept%27%29%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_leoHighlightsGetAttrib%28anchor%2C%27leohighlights_reject%27%29%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%09leoHighlightsShowPopup%28anchorId%2C0%29%3B%0A%20%20%20%09return%20false%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHighlightsHandleHover%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A%20*%20This%20will%20handle%20the%20mouse%20over%20setup%20timers%20for%20the%20appropriate%20timers%0A%20*%20%0A%20*%20@param%20id%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleMouseOver%28id%29%0A%7B%0A%09try%0A%09%7B%0A%20%20%20%20%20%20if%28_leoHighlightsSnoozed%29%0A%20%20%20%20%20%20%20%20%20return%3B%0A%09%20%20%20%0A%09%20%20%20if%28_leoHighlightsIsFrame%28%29%29%0A%09%20%20%20%20%20%20return%3B%0A%09%20%20%20%0A%09%09var%20anchor%3D_leoHighlightsFindElementById%28id%29%3B%09%09%0A%0A%09%09/*%20Clear%20the%20end%20timer%20if%20required%20*/%0A%09%09if%28anchor.endTimer%29%0A%09%09%09clearTimeout%28anchor.endTimer%29%3B%0A%09%09anchor.endTimer%3Dnull%3B%0A%09%09%0A%09%09anchor.style.background%3DLEO_HIGHLIGHTS_BACKGROUND_STYLE_HOVER%3B%0A%09%09%0A%09%09var%20underline%3D_leoHighlightsGetAttrib%28anchor%2C%22leohighlights_underline%22%29%3D%3D%27true%27%3B%0A%09%09%0A%09%09/*%20The%20element%20is%20already%20showing%20we%20are%20done%20*/%0A%09%09if%28anchor.shown%29%0A%09%09%09return%3B%0A%09%09%0A%09%09/*%20Setup%20the%20start%20timer%20if%20required%20*/%0A%09%09anchor.startTimer%3DsetTimeout%28function%28%29%7B%0A%09%09%09leoHighlightsHandleHover%28anchor.id%29%3B%0A%09%09%09anchor.hover%3Dtrue%3B%0A%09%09%09%7D%2Cunderline?LEO_HIGHLIGHTS_SHOW_DELAY_MS%3ALEO_HIGHLIGHTS_SHOW_DELAY_NO_UNDER_MS%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHandleMouseOver%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20handle%20the%20mouse%20over%20setup%20timers%20for%20the%20appropriate%20timers%0A%20*%20%0A%20*%20@param%20id%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleMouseOut%28id%29%0A%7B%0A%09try%0A%09%7B%09%0A%09%09var%20anchor%3D_leoHighlightsFindElementById%28id%29%3B%0A%09%09%0A%09%09/*%20Clear%20the%20start%20timer%20if%20required%20*/%0A%09%09if%28anchor.startTimer%29%0A%09%09%09clearTimeout%28anchor.startTimer%29%3B%0A%09%09anchor.startTimer%3Dnull%3B%0A%09%09%0A%09%09anchor.style.background%3DLEO_HIGHLIGHTS_BACKGROUND_STYLE_DEFAULT%3B%0A%09%09if%28%21anchor.shown||%21anchor.hover%29%0A%09%09%09return%3B%0A%09%09%0A%09%09/*%20Setup%20the%20start%20timer%20if%20required%20*/%0A%09%09anchor.endTimer%3DsetTimeout%28function%28%29%7B%0A%09%09%09leoHighlightsHideElem%28LEO_HIGHLIGHTS_IFRAME_DIV_ID%29%3B%0A%09%09%09anchor.shown%3Dfalse%3B%0A%09%09%09_leoHighlightsPrevElem%3Dnull%3B%0A%09%09%09%7D%2CLEO_HIGHLIGHTS_HIDE_DELAY_MS%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHandleMouseOut%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A%20*%20This%20handles%20the%20mouse%20movement%20into%20the%20currently%20opened%20window.%0A%20*%20Just%20clear%20the%20close%20timer%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleIFrameMouseOver%28%29%0A%7B%0A%09try%0A%09%7B%0A%09%09if%28_leoHighlightsPrevElem%26%26_leoHighlightsPrevElem.endTimer%29%0A%09%09%09clearTimeout%28_leoHighlightsPrevElem.endTimer%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHandleIFrameMouseOver%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A%20*%20This%20handles%20the%20mouse%20movement%20into%20the%20currently%20opened%20window.%0A%20*%20Just%20clear%20the%20close%20timer%0A%20*%20%0A%20*%20@param%20id%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleIFrameMouseOut%28%29%0A%7B%0A%09try%0A%09%7B%0A%09%09if%28_leoHighlightsPrevElem%29%0A%09%09%09leoHighlightsHandleMouseOut%28_leoHighlightsPrevElem.id%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHandleIFrameMouseOut%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A/**%0A%20*%20This%20is%20a%20method%20is%20used%20to%20make%20the%20javascript%20within%20IE%20runnable%0A%20*/%0Avar%20leoHighlightsRanUpdateDivs%3Dfalse%3B%0Afunction%20leoHighlightsUpdateDivs%28%29%0A%7B%0A%09try%0A%09%7B%0A%09%09/*%20Check%20if%20this%20is%20an%20IE%20browser%20and%20if%20divs%20have%20been%20updated%20already%20*/%0A%09%09if%28document.all%26%26%21leoHighlightsRanUpdateDivs%26%26%21_leoHighlightsIsFrame%28%29%29%0A%09%09%7B%0A%09%09%09leoHighlightsRanUpdateDivs%3Dtrue%3B%20//%20Set%20early%20to%20prevent%20running%20twice%0A%09%09%09for%28var%20i%3D0%3Bi%3CLEO_HIGHLIGHTS_MAX_HIGHLIGHTS%3Bi%2B%2B%29%0A%09%09%09%7B%0A%09%09%09%09var%20id%3D%22leoHighlights_Underline_%22%2Bi%3B%0A%09%09%09%09var%20elem%3D_leoHighlightsFindElementById%28id%29%3B%0A%09%09%09%09if%28elem%3D%3Dnull%29%0A%09%09%09%09%09break%3B%0A%09%09%09%09%0A%09%09%09%09if%28%21elem.leoChanged%29%0A%09%09%09%09%7B%0A%09%09%09%09%09elem.leoChanged%3Dtrue%3B%0A%09%09%09%09%0A%09%09%09%09%09/*%20This%20will%20make%20javaScript%20runnable%20*/%09%09%09%09%0A%09%09%09%09%09elem.outerHTML%3Delem.outerHTML%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsUpdateDivs%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0Aif%28document.all%29%0A%09setTimeout%28leoHighlightsUpdateDivs%2C200%29%3B%0A%0A%0A/**%0A%20*%20This%20is%20used%20to%20report%20events%20to%20the%20plugin%0A%20*%20@param%20key%0A%20*%20@param%20domain%0A%20*%20@param%20keywords%0A%20*%20@param%20vendorId%0A%20*%20@param%20accept%0A%20*%20@param%20reject%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsReportEvent%28key%2C%20domain%2Ckeywords%2CvendorId%2Caccept%2Creject%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22key%22%2Ckey%29%3B%0A%20%20%20%20%20%20if%28domain%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22domain%22%2Cdomain%29%3B%0A%20%20%20%20%20%20if%28keywords%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22keywords%22%2Ckeywords%29%3B%0A%20%20%20%20%20%20if%28vendorId%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22vendorId%22%2CvendorId%29%3B%0A%20%20%20%20%20%20if%28accept%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22accept%22%2Caccept%29%3B%0A%20%20%20%20%20%20if%28reject%21%3Dnull%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22reject%22%2Creject%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20gwObj.callName%28%22LeoHighlightsEvent%22%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlights%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20expand%20or%20collapse%20the%20window%20base%20on%20it%20prior%20state%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsToggleSize%28clickId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%20%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsToggleSize%28%29%20%22%2B_leoHighlightsPrevElem%29%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Get%20the%20hover%20flag%20and%20change%20the%20status%20*/%0A%20%20%20%20%20%20var%20size%3D_leoHighlightsPrevElem.hover?1%3A0%3B%0A%20%20%20%20%20%20_leoHighlightsSetBottomSize%28size%2CclickId%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsToggleSize%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20Call%20into%20the%20kvm%20that%20will%20then%20do%20a%20callback%20into%20the%20top%20window%0A%20*%20The%20top%20window%20will%20then%20call%20leoH%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsSetSecondaryWindowUrl%28url%2C%20customerId%2C%20phraseId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsSetSecondaryWindowUrl%28%29%20%22%2Burl%29%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22url%22%2C%20url%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22phraseId%22%2C%20phraseId%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22customerId%22%2C%20customerId%29%3B%0A%20%20%20%20%20%20gwObj.callName%28%22LeoHighlightsSetSecondaryWindowUrl%22%29%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsSetSecondaryWindowUrl%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20Call%20into%20the%20kvm%20that%20will%20then%20do%20a%20callback%20into%20the%20top%20window%0A%20*%20The%20top%20window%20will%20then%20call%20leoH%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsSetSecondaryWindowUrlCallback%28url%2C%20customerId%2C%20phraseId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsSetSecondaryWindowUrlCallback%28%29%20%22%2Burl%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Clear%20the%20hover%20flag%2C%20if%20the%20user%20shows%20this%20at%20full%20size%20*/%0A%20%20%20%20%20%20var%20size%3D_leoHighlightsPrevElem.hover?0%3A1%3B%20%20%20%20%20%20%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsSetSecondaryWindowUrlCallback%28%29%20%22%2B_leoHighlightsPrevElem%2B%22%20--%20%22%2B_leoHighlightsPrevElem.hover%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Get%20the%20elements%20*/%0A%20%20%20%20%20%20var%20iFrameBottom%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_BOTTOM_ID%29%3B%0A%20%20%20%20%20%20leoHighlightsUpdateUrl%28iFrameBottom%2Csize%2Cnull%2Curl%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHighlightsSetSecondaryWindowUrlCallback%28%29%20%22%2Burl%29%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsSetSecondaryWindowUrlCallback%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20set%20the%20text%20to%20the%20Top%20%0A%20*%20%0A%20*%20@param%20txt%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsSetExpandTxt%28txt%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%0A%20%20%20%20%20%20var%20topIFrame%20%3D%20_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_TOP_ID%29%3B%0A%20%20%20%20%20%20if%28topIFrame%3D%3Dnull%29%0A%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Get%20the%20current%20url%20*/%0A%20%20%20%20%20%20var%20url%3DtopIFrame.src%3B%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28url%3D%3Dnull%29%0A%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Extract%20the%20previous%20hash%20if%20present%20*/%0A%20%20%20%20%20%20var%20idx%3D-1%3B%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28%28idx%3Durl.indexOf%28%27%23%27%29%29%3E0%29%0A%20%20%20%20%20%20%20%20%20url%3Durl.substring%280%2Cidx%29%3B%0A%0A%20%20%20%20%20%20/*%20Append%20the%20text%20to%20the%20end%20*/%0A%20%20%20%20%20%20url%2B%3D%22%23%22%2BencodeURI%28txt%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Set%20the%20iframe%20with%20the%20new%20url%20that%20contains%20the%20hash%20tag%20*/%0A%20%20%20%20%20%20topIFrame.src%3Durl%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHighlightsSetExpandTxt%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/*----------------------------------------------------------------------*/%0A/*%20Methods%20provided%20to%20the%20highlight%20providers...%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20*/%0A/*----------------------------------------------------------------------*/%0A%0A/**%0A%20*%20This%20will%20set%20the%20expand%20text%20for%20the%20Top%20window%0A%20*/%0Afunction%20leoHL_SetExpandTxt%28txt%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsDebugLog%28%22leoHL_SetExpandTxt%28%29%20%22%2Btxt%29%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20_leoHighlightsSimpleGwCallBack%28%22LeoHighlightsSetExpandTxt%22%2C%22expandTxt%22%2Ctxt%29%3B%20%20%20%20%20%20%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHL_SetExpandTxt%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20redirect%20the%20top%20window%20to%20the%20passed%20in%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@param%20parentId%0A%20*%20@return%0A%20*/%0Afunction%20leoHL_RedirectTop%28url%2CparentId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%0A%20%20%20%20%20%20try%7B%0A%20%20%20%20%20%20%20%20%20var%20domain%3D_leoHighlightsGetUrlArg%28window.document.URL%2C%22domain%22%29%0A%20%20%20%20%20%20%20%20%20var%20keywords%3D_leoHighlightsGetUrlArg%28window.document.URL%2C%22keywords%22%29%0A%20%20%20%20%20%20%20%20%20var%20vendorId%3D_leoHighlightsGetUrlArg%28window.document.URL%2C%22vendorId%22%29%0A%20%20%20%20%20%20leoHighlightsReportEvent%28%22clickthrough%22%2C%20domain%2Ckeywords%2C%20vendorId%29%3B%0A%20%20%20%20%20%20%7Dcatch%28e%29%7B%0A%20%20%20%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHL_RedirectTop%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%20%20%20%20%7D%0A%20%20%09%09%0A%20%20%20%09_leoHighlightsRedirectTop%28url%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHL_RedirectTop%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20redirect%20the%20top%20window%20to%20the%20passed%20in%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@param%20parentId%0A%20*%20@return%0A%20*/%0Afunction%20LeoHL_RedirectTop%28url%2CparentId%29%0A%7B%0A%20%20%20leoHL_RedirectTop%28url%2CparentId%29%3B%0A%7D%0A%0A/**%0A%20*%20This%20will%20redirect%20the%20top%20window%20to%20the%20passed%20in%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@param%20parentId%0A%20*%20@return%0A%20*/%0Afunction%20leoHL_RedirectTopAd%28url%2CparentId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%0A%20%20%20%20%20%20try%7B%0A%20%20%20%20%20%20%20%20%20var%20domain%3D_leoHighlightsGetUrlArg%28window.document.URL%2C%22domain%22%29%0A%20%20%20%20%20%20%20%20%20var%20keywords%3D_leoHighlightsGetUrlArg%28window.document.URL%2C%22keywords%22%29%0A%20%20%20%20%20%20%20%20%20var%20vendorId%3D_leoHighlightsGetUrlArg%28window.document.URL%2C%22vendorId%22%29%0A%20%20%20%20%20%20leoHighlightsReportEvent%28%22advertisement.click%22%2C%20domain%2Ckeywords%2C%20vendorId%29%3B%0A%20%20%20%20%20%20%7Dcatch%28e%29%7B%0A%20%20%20%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHL_RedirectTopAd%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20_leoHighlightsRedirectTop%28url%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHL_RedirectTopAd%28%29%22%2Ce%29%3B%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A%0A/**%0A%20*%20This%20will%20set%20the%20size%20of%20the%20iframe%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@param%20parentId%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHl_setSize%28size%2Curl%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09/*%20Get%20the%20clickId%20*/%0A%20%20%20%09var%20clickId%3D_leoHighlightsGetUrlArg%28%20url%2C%22clickId%22%29%0A%20%20%20%09%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22size%22%2Csize%29%3B%0A%20%20%20%20%20%20if%28clickId%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22clickId%22%2CclickId%2B%22_blah%22%29%3B%0A%20%20%20%20%20%20gwObj.callName%28%22LeoHighlightsSetSize%22%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHl_setSize%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20toggle%20the%20size%20of%20the%20window%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHl_ToggleSize%28%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20gwObj.callName%28%22LeoHighlightsToggleSize%22%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%20%20%20_leoHighlightsReportExeception%28%22leoHl_ToggleSize%28%29%22%2Ce%29%3B%20%20%20%20%20%0A%20%20%20%7D%0A%7D%0A%0A"); &lt;/script&gt; &lt;/span&gt;&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-6610869077402102860?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/6610869077402102860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/01/apexdoc-salesforce-code-documentation.html#comment-form' title='40 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/6610869077402102860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/6610869077402102860'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/01/apexdoc-salesforce-code-documentation.html' title='ApexDoc - A Salesforce Code Documentation Tool'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_IGUMdDVFXNs/TUEFLHI5h6I/AAAAAAAABd4/tF-ALYxN95A/s72-c/apex_doc_logo.png' height='72' width='72'/><thr:total>40</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-1835415882774148057</id><published>2011-01-15T08:32:00.000-08:00</published><updated>2011-01-15T08:48:29.840-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='call'/><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='wsdl2ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='webservice'/><category scheme='http://www.blogger.com/atom/ns#' term='query'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='soap'/><category scheme='http://www.blogger.com/atom/ns#' term='method'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='web service'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><title type='text'>Ruby and Salesforce Integration with SOAP</title><content type='html'>Hi All,&lt;br /&gt;I am not a Ruby guy, but last few days i had to look into this language, moreover in the context of calling apex web service method using Ruby. I love doing this using java and php, even i did in python also, but this time its a challenge for me to achieve this. Its a challenge because lack of documentation and sample codes on net and as a newbie in Ruby world. As every new developer i also searched many times on net but was struggling sometimes setting up Ruby, sometimes rubygems, sometimes things were not working. I left many times work in middle long before also. But searching and searching and i found this blogpost by Andrew very helpful. &lt;a href="http://hideoustriumph.wordpress.com/2008/05/05/ws-deathstar-for-the-rest-of-us/"&gt;http://hideoustriumph.wordpress.com/2008/05/05/ws-deathstar-for-the-rest-of-us/.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So most of the things i took from that blog only and here i am describing some sample code how i achieve my task.&lt;br /&gt;&lt;br /&gt;1) You first need to install ruby. I had InstantRails 2.0. That fits my need.&lt;br /&gt;2) Now first go to your developer account, Setup-&gt;Develop-&gt;API, choose "enterprise.wsdl" and save it somewhere on your disk , for example in my case i am saving it as below location.&lt;br /&gt;D:\RubyRails\rails_apps\sfdc\enterprise.xml&lt;br /&gt;3) Open the ruby console&lt;br /&gt;4) Then you need to install "SOAP4R" by this command.&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;gem install soap4r&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When i ran this command, i got errors like "Errno::EADDRNOTAVAIL". Its because my gems were outdated, if this is the same case with you then you need to install first updated gems. so...&lt;br /&gt;5) go to this site &lt;a href="http://rubygems.org/pages/download"&gt;http://rubygems.org/pages/download &lt;/a&gt;&lt;br /&gt;6) Download the gems and unpack to a directory and go to that directory from the command line&lt;br /&gt;7) Install with:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;ruby setup.rb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;8) Now issue the command to install soap4r&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;gem install soap4r&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hopefully this time it will get installed.&lt;br /&gt;9) Now go to that directory where you saved the "enterprise.xml" from command line and issue following command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;ruby wsdl2ruby.rb --wsdl D:\RubyRails\rails_apps\sfdc\enterprise.xml --type client --force&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You will see 4 files created into your current directory ('sfdc' in above case)&lt;br /&gt;&lt;br /&gt;10) Now here is the code for one extra file which i copied from the above blogpost for easy login&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;client_auth_header_handler.rb&lt;/span&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDiv0fc2277c-6e76-4cc6-a23a-3ef8b497bbd1" style="margin: 0px; display: none;"&gt;&lt;iframe id="iframe0fc2277c-6e76-4cc6-a23a-3ef8b497bbd1" src="http://www.blogtrog.com/code.aspx?id=0fc2277c-6e76-4cc6-a23a-3ef8b497bbd1" style="border: 1px solid rgb(224, 224, 224); margin: 0px; width: 600px; height: 200px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv0fc2277c-6e76-4cc6-a23a-3ef8b497bbd1" style="margin: 0px; display: block;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;require &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;soap/header/simplehandler&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ClientAuthHeaderHandler &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; SOAP::Header::SimpleHandler&lt;br /&gt;SessionHeader &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; XSD::QName.new(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;rn:enterprise.soap.sforce.com&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;SessionHeader&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;&lt;br /&gt;attr_accessor :sessionid&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;def&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; initialize&lt;br /&gt;super(SessionHeader)&lt;br /&gt;@sessionid &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; nil&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;def&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; on_simple_outbound&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; @sessionid&lt;br /&gt;  {&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;sessionId&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; @sessionid}&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;def&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; on_simple_inbound(my_header, mustunderstand)&lt;br /&gt;@sessionid &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; my_header[&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;sessionid&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;]&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('0fc2277c-6e76-4cc6-a23a-3ef8b497bbd1');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;11) And now here is the final code for doing Login, fetching records from Account object and Printing raw output on screen. Change the username, password and security token as needed.&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;test.rb&lt;/span&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;&lt;br /&gt;&lt;div id="iframeDivd89a7aeb-c6b8-4d9d-b2e6-4c2eeecd70df" style="margin: 0px; display: none;"&gt;&lt;iframe id="iframed89a7aeb-c6b8-4d9d-b2e6-4c2eeecd70df" src="http://www.blogtrog.com/code.aspx?id=d89a7aeb-c6b8-4d9d-b2e6-4c2eeecd70df" style="border: 1px solid rgb(224, 224, 224); margin: 0px; width: 600px; height: 200px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDivd89a7aeb-c6b8-4d9d-b2e6-4c2eeecd70df" style="margin: 0px; display: block;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;require &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;rubygems&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;gem &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;soap4r&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;require &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;soap/soap&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;require &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;defaultDriver&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;require &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;client_auth_header_handler&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;require &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;soap/wsdlDriver&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;d &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Soap.new&lt;br /&gt;d.wiredump_dev &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; STDOUT&lt;br /&gt;&lt;br /&gt;h &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ClientAuthHeaderHandler.new          &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;#&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Create a new handler&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;l &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; d.login(:username &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;USERNAME&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, :password &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;PASSWORD&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;SECURITY_TOKEN&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;&lt;br /&gt;d.endpoint_url &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; l.result.serverUrl         &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;#&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Change the endpoint to what login tells us it should be&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;h.sessionid &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; l.result.sessionId              &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;#&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Tell the header handler what the session id is&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;d.headerhandler &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; h                          &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;#&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Add the header handler to the Array of headerhandlers&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;d.getUserInfo(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;d.query(:queryString&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;select id,name from account&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('d89a7aeb-c6b8-4d9d-b2e6-4c2eeecd70df');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12) For test the above code,  go to ruby console, go to "sfdc" folder and issue following command.&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;ruby test.rb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;13) Now, the main task for which i struggled and not found any easy code on net. Calling apex method from ruby. I tried different things and thought it might be of few lines but may be complex. But finally after so many hit and trial i found that, the code is really very small and easy enough.&lt;br /&gt;&lt;br /&gt;14) For example, lets say i want to make one webservice method in Apex to just print one greeting message on screen to passed one Name param. Create one apex class like this.&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;MyService.cls&lt;/span&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;&lt;div id="iframeDivcfa7bfad-c7b4-4ddc-b144-ebb6457fd1b3" style="margin: 0px; display: none;"&gt;&lt;iframe id="iframecfa7bfad-c7b4-4ddc-b144-ebb6457fd1b3" src="http://www.blogtrog.com/code.aspx?id=cfa7bfad-c7b4-4ddc-b144-ebb6457fd1b3" style="border: 1px solid rgb(224, 224, 224); margin: 0px; width: 600px; height: 200px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDivcfa7bfad-c7b4-4ddc-b144-ebb6457fd1b3" style="margin: 0px; display: block;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;global &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; MyService{&lt;br /&gt;    webservice &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; string printMe(string name){&lt;br /&gt;         &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Hello &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; name;&lt;br /&gt;    }&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('cfa7bfad-c7b4-4ddc-b144-ebb6457fd1b3');&lt;/script&gt;15) Save the above class and click on WSDL link/button for this class. You will get one xml file regarding this class. Save it to your disk. For example i am saving this to "service" folder with name "myservice.xml":-&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;D:\RubyRails\rails_apps\sfdc\service\myservice.xml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;16) Now here is the complete code to invoke the "printMe" method, for calling this you also need login first, so the complete example is as below.&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;test.rb&lt;/span&gt;&lt;br /&gt;------------------------------------------------&lt;br /&gt;&lt;div id="iframeDiv5fdf213e-bc4f-4785-8a29-ab75b4fc6d69" style="margin: 0px; display: none;"&gt;&lt;iframe id="iframe5fdf213e-bc4f-4785-8a29-ab75b4fc6d69" src="http://www.blogtrog.com/code.aspx?id=5fdf213e-bc4f-4785-8a29-ab75b4fc6d69" style="border: 1px solid rgb(224, 224, 224); margin: 0px; width: 600px; height: 200px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv5fdf213e-bc4f-4785-8a29-ab75b4fc6d69" style="margin: 0px; display: block;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;require &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;rubygems&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;gem &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;soap4r&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;require &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;soap/soap&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;require &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;defaultDriver&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;require &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;client_auth_header_handler&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;require &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;soap/wsdlDriver&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;d &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Soap.new&lt;br /&gt;d.wiredump_dev &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; STDOUT&lt;br /&gt;&lt;br /&gt;h &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ClientAuthHeaderHandler.new          &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;#&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Create a new handler&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;l &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; d.login(:username &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;USERNAME&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, :password &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;PASSWORD&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;SECURITY_TOKEN&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;&lt;br /&gt;d.endpoint_url &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; l.result.serverUrl         &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;#&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Change the endpoint to what login tells us it should be&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;h.sessionid &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; l.result.sessionId              &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;#&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Tell the header handler what the session id is&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;d.headerhandler &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; h                          &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;#&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Add the header handler to the Array of headerhandlers&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;client &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; SOAP::WSDLDriverFactory.new( &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;service/myservice.xml&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ).create_rpc_driver&lt;br /&gt;client.wiredump_dev &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; STDOUT&lt;br /&gt;client.headerhandler &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; h&lt;br /&gt;result &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; client.printMe(:name &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Aslam Bari&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('5fdf213e-bc4f-4785-8a29-ab75b4fc6d69');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;17) If all goes well, you will see raw xml output on console printed.&lt;br /&gt;18) Now its time to explore more in your Ruby skills with SFDC :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1716073687404477810-1835415882774148057?l=techsahre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techsahre.blogspot.com/feeds/1835415882774148057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techsahre.blogspot.com/2011/01/ruby-and-salesforce-integration-with.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/1835415882774148057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1716073687404477810/posts/default/1835415882774148057'/><link rel='alternate' type='text/html' href='http://techsahre.blogspot.com/2011/01/ruby-and-salesforce-integration-with.html' title='Ruby and Salesforce Integration with SOAP'/><author><name>Aslam - The Alexendra</name><uri>http://www.blogger.com/profile/09450719086908671499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_IGUMdDVFXNs/S2RyEMg886I/AAAAAAAAAFU/wwtDaH9uhJk/S220/cartoon.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1716073687404477810.post-6469420837933070755</id><published>2011-01-11T09:34:00.000-08:00</published><updated>2011-01-15T08:32:02.316-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aslam'/><category scheme='http://www.blogger.com/atom/ns#' term='paypal'/><category scheme='http://www.blogger.com/atom/ns#' term='Aslam Bari'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><title type='text'>Simple Paypal Integration with Salesforce (Step by Step)</title><content type='html'>Hi All,&lt;br /&gt;Recently I got a need to implement Paypal integration with Salesforce for a basic payment for Merchant Type account, the payments would be from Customers using Credit Cards like Visa etc. I started looking into Paypal methods to find out which is best to implement using Apex, then i found one old blog post very helpful (Unfortunately that blog post is removed recently so not able to paste url here).  The method which i preferred is DoDirectPayment. I did some modification in that code and provided in this blog.&lt;br /&gt;The main problem i faced, was not the code, the testing. Like me, many new developers face this problem, thats why i came with this blog to describe step by step procedure to do a simple test with your paypal payment process using salesforce code. This might be useful for the developers who dealing with Paypal first time as well as want to integrate it with Salesforce.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_IGUMdDVFXNs/TSyYmRHGqHI/AAAAAAAABdc/7wHvMohEgog/s1600/paypal%2Bsalesforce.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 94px;" src="http://2.bp.blogspot.com/_IGUMdDVFXNs/TSyYmRHGqHI/AAAAAAAABdc/7wHvMohEgog/s320/paypal%2Bsalesforce.jpg" alt="" id="BLOGGER_PHOTO_ID_5560987423091370098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;1) Setup one sandbox account.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Go to &lt;a href="http://developer.paypal.com/"&gt;http://developer.paypal.com&lt;/a&gt; and create one account there. After creating, login there only. In the left menu you will find "Test Accounts" link. Click on that.&lt;br /&gt;From the right side screen, you can create multiple test accounts.&lt;br /&gt;For testing purpose generally you need two type of accounts. One is "Seller" and one is "Buyer". Its always better to create preconfigured accounts.&lt;br /&gt;Click on "PreConfigured" link to create one 'Buyer' account, set some amount there.&lt;br /&gt;Click on "PreConfigured" link to create one 'Seller' account, set some amount there.&lt;br /&gt;Click on "PreConfigured" link to create one 'Website Payments Pro' account, used for Merchant (Seller), set some amount there. Dont choose seller account this time because we going to use "DoDirectPayment" API method which need this type of account.&lt;br /&gt;&lt;br /&gt;We dont need "Seller" account but i found after some struggle that if you not create any Seller account first then if you create any 'Website Payments Pro', then it will always be "unverified". I am not sure why it is like this. But this is "My Best Practice" that you should first create one Seller account, then create this ''Website Payments Pro' account. And verify, that one  is marked as "Verified" as shown in the below screenshot.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_IGUMdDVFXNs/TSyVtD9ifnI/AAAAAAAABdU/fXalVhh6_D0/s1600/selleraccount.JPG"&gt;&lt;img style="cursor: pointer; width: 320px; height: 253px;" src="http://1.bp.blogspot.com/_IGUMdDVFXNs/TSyVtD9ifnI/AAAAAAAABdU/fXalVhh6_D0/s320/selleraccount.JPG" alt="" id="BLOGGER_PHOTO_ID_5560984241285791346" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2) Test Merchant Account API Setup&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, select your 'website payments pro' account using radio button there and click 'Enter Sandbox Test Site'.&lt;br /&gt;Login with your password.&lt;br /&gt;Click on Profile link after you login. It will be on top right side.&lt;br /&gt;Click on 'Request API Credentials' link in bottom left side.&lt;br /&gt;Click on 'Set up PayPal API credentials and permissions' link.&lt;br /&gt;Click on 'View API Signature' link and note down your API Username, API Password, API Signature&lt;br /&gt;Click on 'Grant API Access' link on previous screen. Here give your API username and Check all checkboxes and Save&lt;br /&gt;Now you ok with configuration.&lt;br /&gt;&lt;br /&gt;2) Salesforce Code setup&lt;br /&gt;Now copy paste following Apex Class code in your org.&lt;br /&gt;Add "https://api-3t.sandbox.paypal.com/2.0/" url into "Remote Site Setting".&lt;br /&gt;&lt;br /&gt;In the below code change your API Username, API Password and Signature.&lt;br /&gt;&lt;div id="iframeDiv94b62e44-2b00-4898-a6a0-a081b6193718" style="margin: 0px; display: none;"&gt;&lt;iframe id="iframe94b62e44-2b00-4898-a6a0-a081b6193718" src="http://www.blogtrog.com/code.aspx?id=94b62e44-2b00-4898-a6a0-a081b6193718" style="border: 1px solid rgb(224, 224, 224); margin: 0px; width: 600px; height: 200px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv94b62e44-2b00-4898-a6a0-a081b6193718" style="margin: 0px; display: block;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; PaypalProccessor{&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string amount;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  String result {set;get;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string FirstName{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string LastName{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string Addy1{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string Addy2{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string Country{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string CardType{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string CardNo{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string expMo{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string expYe{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string CVV{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string city{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string state{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string zip{get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string payer{ get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string transid {get; set;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string message {get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string err {get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  string rawResponse {get; set; }&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; PaypalProccessor(){&lt;br /&gt;city &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;state &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;zip &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;CVV &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;expYe &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;expMo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;CardNo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;CardType &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Visa&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;FirstName &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;LastName &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;Country &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;US&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;Addy1 &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;Addy2 &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;payer &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;message &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; String doDirectPayment()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;Http h &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Http();&lt;br /&gt;HttpRequest req &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; HttpRequest();&lt;br /&gt;String url &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;https://api-3t.sandbox.paypal.com/2.0/&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;string un &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;sel2_1294222298_biz_api1.gmail.com&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;string pw &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;xxxxxxxxxx&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;string sig &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;AwG6Yp1inPr4tudjFvxxxxxxxtAVuo9M5cH1nAqpxK2Biv1RrZa4gX&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;String doDirectRequest;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;soap:Envelope xmlns:soap=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; xmlns:xsi=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; xmlns:xsd=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;soap:Header&amp;gt;&amp;lt;RequesterCredentials xmlns="urn:ebay:api:PayPalAPI"&amp;gt;&amp;lt;Credentials xmlns="urn:ebay:apis:eBLBaseComponents"&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;Username&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; un &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/Username&amp;gt;&amp;lt;ebl:Password xmlns:ebl="urn:ebay:apis:eBLBaseComponents"&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; pw;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/ebl:Password&amp;gt;&amp;lt;Signature&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; sig &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/Signature&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/Credentials&amp;gt;&amp;lt;/RequesterCredentials&amp;gt;&amp;lt;/soap:Header&amp;gt;&amp;lt;soap:Body&amp;gt;&amp;lt;DoDirectPaymentReq xmlns="urn:ebay:api:PayPalAPI"&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;DoDirectPaymentRequest&amp;gt;&amp;lt;Version xmlns="urn:ebay:apis:eBLBaseComponents"&amp;gt;1.00&amp;lt;/Version&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;DoDirectPaymentRequestDetails xmlns="urn:ebay:apis:eBLBaseComponents"&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;PaymentAction&amp;gt;Sale&amp;lt;/PaymentAction&amp;gt;&amp;lt;PaymentDetails&amp;gt;&amp;lt;OrderTotal currencyID="USD"&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; amount &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/OrderTotal&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;ShipToAddress&amp;gt;&amp;lt;Name&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; FirstName &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; LastName &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/Name&amp;gt;&amp;lt;Street1&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Addy1 &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/Street1&amp;gt;&amp;lt;Street2&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Addy2 &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/Street2&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;CityName&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; city &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/CityName&amp;gt;&amp;lt;StateOrProvince&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; state &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/StateOrProvince&amp;gt;&amp;lt;PostalCode&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; zip &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/PostalCode&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;Country&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; country &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/Country&amp;gt;&amp;lt;/ShipToAddress&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/PaymentDetails&amp;gt;&amp;lt;CreditCard&amp;gt;&amp;lt;CreditCardType&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; CardType &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/CreditCardType&amp;gt;&amp;lt;CreditCardNumber&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; CardNo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/CreditCardNumber&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;ExpMonth&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; expMo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/ExpMonth&amp;gt;&amp;lt;ExpYear&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; expYe &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/ExpYear&amp;gt;&amp;lt;CardOwner&amp;gt;&amp;lt;PayerStatus&amp;gt;verified&amp;lt;/PayerStatus&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;PayerName&amp;gt;&amp;lt;FirstName&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; FirstName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/FirstName&amp;gt;&amp;lt;LastName&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; LastName &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/LastName&amp;gt;&amp;lt;/PayerName&amp;gt;&amp;lt;PayerCountry&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; country &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/PayerCountry&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;Address&amp;gt;&amp;lt;Street1&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Addy1 &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/Street1&amp;gt;&amp;lt;Street2&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Addy2 &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/Street2&amp;gt;&amp;lt;CityName&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; city &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/CityName&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;StateOrProvince&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; state &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/StateOrProvince&amp;gt;&amp;lt;Country&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; country &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/Country&amp;gt;&amp;lt;PostalCode&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; zip &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/PostalCode&amp;gt;&amp;lt;/Address&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/CardOwner&amp;gt;&amp;lt;CVV2&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; CVV &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/CVV2&amp;gt;&amp;lt;/CreditCard&amp;gt;&amp;lt;/DoDirectPaymentRequestDetails&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;doDirectRequest &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/DoDirectPaymentRequest&amp;gt;&amp;lt;/DoDirectPaymentReq&amp;gt;&amp;lt;/soap:Body&amp;gt;&amp;lt;/soap:Envelope&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;br /&gt;req.setBody(doDirectRequest);&lt;br /&gt;&lt;br /&gt;req.setEndpoint(url);&lt;br /&gt;req.setMethod(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;POST&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;req.setHeader(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Content-length&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1753&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; );&lt;br /&gt;req.setHeader(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Content-Type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;text/xml;charset=UTF-8&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;req.setHeader(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SOAPAction&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;req.setHeader(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Host&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;api-aa.sandbox.paypal.com&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;HttpResponse res &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; h.send(req);&lt;br /&gt;String xml &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; res.getBody();&lt;br /&gt;rawResponse &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; xml;&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;::&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; rawResponse);&lt;br /&gt;XmlStreamReader reader &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; res.getXmlStreamReader();&lt;br /&gt;result &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; readXMLResponse(reader,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Ack&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;reader &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; res.getXmlStreamReader();&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; readXMLResponse(reader, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;LongMessage&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (result &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Success&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;{&lt;br /&gt;reader &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; res.getXmlStreamReader();&lt;br /&gt;transid &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; readXMLResponse(reader, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;TransactionID&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;  system.debug(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;::&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; transid );&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;{&lt;br /&gt;result &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; err;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; result;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; String readXMLResponse(XmlStreamReader reader, String sxmltag)&lt;br /&gt;{&lt;br /&gt;string retValue; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Read through the XML&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;while&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(reader.hasNext())&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (reader.getEventType() &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; XmlTag.START_ELEMENT)&lt;br /&gt;{&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (reader.getLocalName() &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; sxmltag) {&lt;br /&gt;    reader.next();&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (reader.getEventType() &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; XmlTag.characters)&lt;br /&gt;    {&lt;br /&gt;      retValue &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; reader.getText();&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;reader.next();&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; retValue;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; String pay(){&lt;br /&gt;&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (FirstName &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;You must enter a First Name.\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (LastName &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;You must enter a Last Name.\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (Addy1 &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;You must enter an Address.\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (city &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;You must enter a City.\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (state &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;You must enter a State.\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (zip &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;You must enter a Zip.\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (CardNo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;You must enter a Credit Card Number.\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (expMo.length() &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Expiration month must be in the format MM.\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (expYe.length() &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Expiration year must be in the format YYYY.\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (amount &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;{&lt;br /&gt;err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Amount 0 can not process.\n&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;message &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; err;&lt;br /&gt;}&lt;br /&gt;message &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; err;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (err &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;{&lt;br /&gt;message &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; doDirectPayment();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (message &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Success&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;pr = null;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; message;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('94b62e44-2b00-4898-a6a0-a081b6193718');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3) Run and Test&lt;/span&gt;&lt;br /&gt;Now you can use below code to do a sample payment. Run this code either on your VF screen or from System Log screen.&lt;br /&gt;&lt;div id="iframeDiv33502ff6-25e2-4e69-80ea-cb5b5194a25b" style="margin: 0px; display: none;"&gt;&lt;iframe id="iframe33502ff6-25e2-4e69-80ea-cb5b5194a25b" src="http://www.blogtrog.com/code.aspx?id=33502ff6-25e2-4e69-80ea-cb5b5194a25b" style="border: 1px solid rgb(224, 224, 224); margin: 0px; width: 600px; height: 200px;" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="noIframeDiv33502ff6-25e2-4e69-80ea-cb5b5194a25b" style="margin: 0px; display: block;"&gt;&lt;pre&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;PaypalProccessor p &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; PaypalProccessor();&lt;br /&gt;p.city &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ajm&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.state &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;CA&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.zip &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;4534&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.CVV &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.expYe &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2016&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.expMo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;01&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.CardNo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;4028398122647025&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.CardType &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Visa&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.FName &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;aslam&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.LName &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;bari&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.Country &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;US&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.Addy1 &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;44&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.Addy2 &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;433&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.payer &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;abuy_1294681533_per@gmail.com&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;p.amount &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;100&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;string message &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; p.pay();&lt;br /&gt;string transactionid &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; p.transid;&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;#### Message::&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; message);&lt;br /&gt;system.debug(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;#### Transaction Id::&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; transactionid);&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script language="javascript" src="http://www.blogtrog.com/scripts/bt_code.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script language="javascript" type="text/javascript"&gt;bt_code_init('33502ff6-25e2-4e69-80ea-cb5b5194a25b');&lt;/script&gt;&lt;br /&gt;You will see that you got one Transaction Id and 'Success' message. If you dont find success message, then print "err" property to check whats wrong.&lt;br /&gt;Log into your test pro account and check your balance, it might be increased. If so, its all fine :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Aslam Bari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/track
