The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> JavaScript Widget to export my content...
Nick
post Oct 9 2006, 06:41 PM
Post #1


Member
***

Group: Members
Posts: 32
Joined: 29-September 06
Member No.: 268





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!!!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 9 2006, 06:56 PM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,353
Joined: 9-August 06
Member No.: 6



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>');
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Nick
post Oct 10 2006, 12:28 AM
Post #3


Member
***

Group: Members
Posts: 32
Joined: 29-September 06
Member No.: 268



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!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd August 2019 - 10:12 PM