Click to See Complete Forum and Search --> : Javascript insert


filthyrich
09-09-2003, 03:17 AM
I have very little experience with javascript, but have been given a bit of a challenge.

I need to insert a table that is created in coldfusion from serverA into an html/asp page on serverB, ie.

<body>

insert table - http://www.serverA.com/table.cfm

</body>

ServerA runs coldfusion and the data will be created dynamically at source to be inserted into a page on an affiliates site on http://www.serverB.com.

Any ideas......

Charles
09-09-2003, 05:28 AM
Originally posted by filthyrich

Any ideas...... 1) You cannot do this with JavaScript, it has no file or internet controls.

2) You shouldn't do it with JavaScript if you could. Support for JavaScript is too spotty.

3) If you are importing a whole page then use the IFRAME (http://www.w3.org/TR/html4/present/frames.html#edef-IFRAME) or the OBJECT (http://www.w3.org/TR/html4/struct/objects.html#edef-OBJECT) elements.

4) If you are importing a fragment then you'll need to use some kind of server side script. I'd use Perl and the LWP::Simple (http://www.perldoc.com/perl5.8.0/lib/lwpcook.html) module but there are other options.

Khalid Ali
09-09-2003, 06:16 AM
And you can use Java(JSP and servlets) or ASP to read a remote internet resource and read or write to it..

Important thing to remember is that you may come accross legal problems in doing so if the site id copy righted and certainly security problems if the contents are in different domains...

filthyrich
09-09-2003, 11:22 AM
Thanks for you help - i think i have found a suitable ASP method.

Copyright is not a problem as both sites are mine, but on servers in different countries.

Thanks....