Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Client-side Scripting _ JavaScript Widget to export my content...

Posted by: Nick Oct 9 2006, 06:41 PM



Hi Folks,

I've got a little nugget on my site that I want to make available to other people to put on their sites. It's really nothing more than a couple lines of text that change periodically.

If other people were all on my server they coulc certainly include this stuff in a php-include, but they're not so I'm guessing something like JavaScript would work. Can anyone point me to a method or resources where this has been done?

Thanks!!!

Posted by: pandy Oct 9 2006, 06:56 PM

Look at the ads by Gooogle at the top of this page. happy.gif

Basically the other sites put a link to the js file on your server where they want the content displayed. Your script document-writes the text.

They use:
<script type="text/javascript" src="http://.../yourscript.js></script>

yourscript.js
document.write('<p>Hello World!<\/p>');

Posted by: Nick Oct 10 2006, 12:28 AM

No kidding! I had no idea it was that easy... very cool. Make that 95 beers I owe you guys... keep up the good work!

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)