Thanks for the quick response. Lets say for the sake of simplicity (and a short weekend project) that I want to have a <div> on my site that anyone can copy a code <script type="text/javascript" src="//www.mycrummysite/mydiv.js"></script> and put on their website so that it shows the my div. Every time i change the contents of the div, it also changes on their site. That seems like a good way to start. Is there a quick way to learn how to do this?
You can't do it that way-- once someone copies the code, it can never be changed by you. What you can change is the contents of the Javascript file. For example, when I make an update to my service, I upload the changes to script.js and the new code is run on the sites that embed that script.
Comments
Thanks for the quick response. Lets say for the sake of simplicity (and a short weekend project) that I want to have a <div> on my site that anyone can copy a code <script type="text/javascript" src="//www.mycrummysite/mydiv.js"></script> and put on their website so that it shows the my div. Every time i change the contents of the div, it also changes on their site. That seems like a good way to start. Is there a quick way to learn how to do this?
You can't do it that way-- once someone copies the code, it can never be changed by you. What you can change is the contents of the Javascript file. For example, when I make an update to my service, I upload the changes to script.js and the new code is run on the sites that embed that script.