I have a code that loads a JS script from a URL and put it in my website. I don't want to load the script from a URL because its depends on the URL and when the script in this URL is not working, the script in my website will not work too. What I want to do is to download the script code and save him in the FTP as a JS file, and then to load the script from this file and not from a URL. How do i download the script code? Here is the code that I have right now:
<script src=".js"></script>
<script>SO.load({"lang":"en","dir":"LTR","cookieOptions":{"domain":".trbinaryoptions"},"packages":{"Clock":{},"Balance":{},"RegularPlatform":{"settings":{"selector":"#so-trading"}}}});</script>
I have a code that loads a JS script from a URL and put it in my website. I don't want to load the script from a URL because its depends on the URL and when the script in this URL is not working, the script in my website will not work too. What I want to do is to download the script code and save him in the FTP as a JS file, and then to load the script from this file and not from a URL. How do i download the script code? Here is the code that I have right now:
<script src="https://spotplatform.trbinaryoptions./SpotOptionPlugin.js"></script>
<script>SO.load({"lang":"en","dir":"LTR","cookieOptions":{"domain":".trbinaryoptions."},"packages":{"Clock":{},"Balance":{},"RegularPlatform":{"settings":{"selector":"#so-trading"}}}});</script>
Share
Improve this question
edited Jul 21, 2016 at 9:23
sebaferreras
44.7k11 gold badges119 silver badges137 bronze badges
asked Jul 21, 2016 at 8:42
elironeliron
111 gold badge1 silver badge5 bronze badges
2
- open the Js script link and press ctrl+s i.e save it. Save it by any desired name and then copy it your project folder and then include it in your project files where you have included other files like jquery and css. – Deepak Singh Commented Jul 21, 2016 at 8:45
- Thanks first for your help!. When I press ctrl + s its save the all page. and I want only the script. – eliron Commented Jul 21, 2016 at 8:56
1 Answer
Reset to default 4Open the script from the browser and save the file by Pressing Ctrl + S. That is all you need to do.