diff options
Diffstat (limited to 'sandbox/lresende/sca-1.x/samples/store-distributed/src/main/resources/nodeC/content/store.js')
-rw-r--r-- | sandbox/lresende/sca-1.x/samples/store-distributed/src/main/resources/nodeC/content/store.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sandbox/lresende/sca-1.x/samples/store-distributed/src/main/resources/nodeC/content/store.js b/sandbox/lresende/sca-1.x/samples/store-distributed/src/main/resources/nodeC/content/store.js new file mode 100644 index 0000000000..088a80a1d1 --- /dev/null +++ b/sandbox/lresende/sca-1.x/samples/store-distributed/src/main/resources/nodeC/content/store.js @@ -0,0 +1,39 @@ + +function dhtmlLoadScript(url) { + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = url; + document.getElementsByTagName('head')[0].appendChild(script); +} + +function dhtmlLoadScriptIFrame(iframeId, url) { + var iframe = document.createElement("IFRAME"); + iframe.style.display="none"; + iframe.name = iframeId; + iframe.id = iframeId; + iframe.src = url; + document.body.appendChild(iframe); + + //var iframeDocument = window.frames[iframeId].document; + //iframeDocument.write('<script src="', url, '" type="text/JavaScript"><\/script>'); +} + + +function staticLoadScript(url) +{ + document.write('<script src="', url, '" type="text/JavaScript"><\/script>'); +} + + +function initialize() { + + + //alert('will load sotre.js from nodeA'); + //dhtmlLoadScriptIFrame("iframe", "http://localhost:8100/store/nodeA/store.html"); + + //alert('will load sotre.js from nodeB'); + //dhtmlLoadScriptIFrame("iframe2","http://localhost:8200/store/nodeB/store.html"); +} + +/** End of Apache Tuscany SCA Widget */ + |