You need to sign in to do that
Don't have an account?
Jquery Javascript on Salesforce Standard page
Hi!
I'd like to get autocomplete options on a custom field found on a salesforce standard page layout.
following http://jungleeforce.wordpress.com/2013/05/05/using-jquerys-autocomplete-in-salesforce-part-1/ , i've been able to obtain autocomplete options on a VisualForce page.
I've tried replicating this for a standard page layout by using a homepage component.
So far, i've been obtained to get the id of the field and i've replicated the code for the home page component with some tweaks.
<script type='text/javascript' href='/resource/jquery182'></script> <script type='text/javascript' href='/resource/jqueryUI'></script> <script type="text/javascript"> //Create a new variable j$ just to avoid any conflicts with other libraries which may be using $. var j$ = jQuery.noConflict(); //Capture the list of countries in a Array. var countryArray = ['India', 'USA', 'China','FInland','Norway','Netherlands','England','Ukraine','Russia','Japan','Korea','Burma','Srilanka','Iran','Iceland','Canada','Rome','Australia','Armenia','Albania','Afghanisthan']; //on Document ready j$(document).ready(function(){ j$("#00Ni0000009IWjG").autocomplete({ source : countryArray }); }); </script>
i don't get any error, but i've observed that
j$(document).ready(function()
does not work. Actually
var j$ = jQuery.noConflict();
also does not work.
so, my question is ,Can i use Document.ready() in a javascript on a standard page layout? is that even possible?
Thank you