javascript include | topic started 9/7/2001; 4:39:36 PM last post 9/10/2001; 12:38:39 PM |
|
Gavin LaRose - Re: javascript include 9/10/2001; 12:38:39 PM (reads: 3566, responses: 0) |
Hi Penn, Depending on what you want to do, yes or no. My understanding of javascript is that it is necessarily restricted to interacting with the client browser, and therefore cannot "talk" to a remote server. Thus javascript itself couldn't, for instance, be triggered by an "onClick" event on a button to contact a remote server and change some aspect of the current page based on the information that was received. However, it can do window location redirects. Thus you could have javascript in a page trigger a page reload with a page at a URL the content in which is dynamically generated by a remote server (and which could be a Web page that included similar javascript to allow subsequent rebuilds). For example, I could reload a page with the information at "http://remote.server/cgi-bin/newpage?item1=3&item5= 12&comment=this+is+a+comment". Then the script newpage could return a new page based on the data given. If you want to use frames, you can do a similar thing to reload just one frame of the page, leaving other frames intact. I hope that's answering your question. Gavin |