I'm trying to learn more about javascript and I've been checking out some code from companies like olark which includes a messaging system on your site.
One thing that I noticed is that when you install their software on your server is that it's just a simple copy/paste of some javascript and then you have a styled window on whatever page it's installed. This has to mean that some HTML/CSS is returned, right?
My question is, how can you go about using javascript and having a form returned or referenced, such as knockout.js? For example, in the most simple sense, say I have the following HTML page. Can I use a <script> tag to call to my server which will return a form?
//page1.html
<body>
...some html here
<script> function call which will return a knockout.js form/table/whatever along with referencing the file containing the viewmodel</script>
</body>
From what I understand anything in a <script> tag is not affected by the same origin policy. Does this mean I can potentially use javascript to call for an external knockout.js form?