Forum archive 2000-2006

Penn Griffen - javascript include

Penn Griffen - javascript include

by Arnold Pizer -
Number of replies: 0
inactiveTopicjavascript include topic started 9/7/2001; 4:39:36 PM
last post 9/10/2001; 12:38:39 PM
userPenn Griffen - javascript include  blueArrow
9/7/2001; 4:39:36 PM (reads: 2948, responses: 1)
I've been tasked with finding a way to use javascript to include a dynamic file from a remote server for our GroupCart order form. Does anyone know whether js can be used to do this and, if so, how it might be done?

Thank you.

-Penn

<| Post or View Comments |>


userGavin LaRose - Re: javascript include  blueArrow
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

<| Post or View Comments |>