Home › Forums › Autocomplete › Error in custom JS
- This topic has 3 replies, 2 voices, and was last updated 9 years, 10 months ago by Alexander Bautz.
-
AuthorPosts
-
-
February 26, 2015 at 19:33 #7148
I added the code to the custom JS of DFFS. But I have the error message below :
There is an unspecified error in the Custom JS in the Misc tab. Please enter setup and revise
Below is the code I added
spjs.ac.textField({
“applyTo”:”test”,
“helpText”:”Project name or number…”,
“listGuid”:”Adresses”,
“listBaseUrl”:””,
“showField”:”Ville”,
“rowLimit”:5,
“listOptionsOnFocus”:false,
“reValidateOnLoad”:false,
“setFields”:[]
});Thanks for your help
-
February 26, 2015 at 19:44 #7149
Hi,
The code looks good, but I suspect you have not referred the script file with the autocomplete solution in your DFFS frontend CEWP.Alexander
-
February 26, 2015 at 20:02 #7150
Hi Alexander,
Thanks for your prompt reply. I did refer the script file. See my DFFS frontend CEWP code :
<link type=”text/css” href=”https://intranet.medaudio.ca/DFFS%204255/DFFS_Frontend.css” rel=”stylesheet”>
<script type=”text/javascript” src=”https://intranet.medaudio.ca/DFFS%204255/jquery-1.6.4.js”></script>
<script type=”text/javascript” src=”https://intranet.medaudio.ca/DFFS%204255/spjs-utility.js”></script>
<script type=”text/javascript” src=”https://intranet.medaudio.ca/DFFS%204255/spjs_autocomplete_min.js”></script>
<script type=”text/javascript” src=”https://intranet.medaudio.ca/DFFS%204255/SPJS-Casc_min.js”></script>
<script type=”text/javascript” src=”https://intranet.medaudio.ca/DFFS%204255/spjsrm_min.js”></script>
<script type=”text/javascript” src=”https://intranet.medaudio.ca/DFFS%204255/vLookup_frontend_min.js”></script>
<script type=”text/javascript”>var spjs_license =”972-06510410910110003xxxxxxxxxxxxxxxxxxxxxxxx”;
var spjs_dffs_backend = “https://intranet.medaudio.ca/DFFS%204255/DFFS_Backend.aspx”;</script>
<script type=”text/javascript” src=”https://intranet.medaudio.ca/DFFS%204255/DFFS_Frontend_min.js”></script>
-
-
February 26, 2015 at 20:44 #7151
Please verify that the script src is correct, and if it is, try moving the code to the CEWP (below the last script tag where) like this:
<script type="text/javascript"> function dffs_Ready(){ spjs.ac.textField({ "applyTo":"test", "helpText":"Project name or number...", "listGuid":"Adresses", "listBaseUrl":"", "showField":"Ville", "rowLimit":5, "listOptionsOnFocus":false, "reValidateOnLoad":false, "setFields":[] }); } </script>
Then bring up the developer console (hit F12 > console) and look for errors.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.