You need to sign in to do that
Don't have an account?
arasu
How can I include a ".js" (dot javascript) file in an S-Control?
Hi,
How can I include a ".js" (dot javascript) file in an S-Control?
Appreciate all your responses in this regard. Please note that the extension of the file is ".js".
Thanks for your responses.
Thanks and regards,
Ambili
To use your own JS, just store your script in any doument folder and get exact link.
then you can put it on your Script with detailed location of js file.
thx - Nazeer,
Chennai
Another option is to store your javascript file as a sControl then call the sControl using a script tag within the "head" of your HTML.
Code:
-greg
Hi Greg,
As suggested, I created an S-control as a "Snippet" for the javascript file and then called it as follows from the other S-control that uses it.
<script src="{!LEFT($SControl.tooltip_js,48)}" type="text/javascript"></script>
but still it is not able to load this object. Am I going wrong somewhere?
Appreciate you feedback in this.
Thanks,
Ambili
Hi Greg,
I changed the scontrol to snippet, but still it the file fails to load. It throws object expected error when I run my main s-control. Please find the head portion o fmy main S-control that shows link to the js file(in red).
I have no clue why this is not working. Is there any other way to include a .js file?
Please advise.
Thanks,
Ambili