On Aug 28, 2005, at 1:48 PM, Edward Summers wrote:
>> <script type='text/html' src='http://foo/bar.cgi' />
>
> If you meant "text/javascript" then this could work if your Perl
> program bar.cgi generated JavaScript...
Yep, that's what I figured out. Thank you.
The secret incantation to embed a client-side Javascript looks like
this:
<script type='text/javascript' src='http://example.org/foo/
bar.cgi'></script>
The trick is to have bar.cgi return Javascript code. Your CGI can be
written in whatever (Perl, Python, PHP, etc.), but it needs to output
Javascript.
I exploited this technique in an implementation of MyLibrary. I:
1. installed MyLibrary
2. used the sample admin interface to create
sets of facets and terms
3. populated the system with Internet resources
4. wrote a simple CGI for a browsable interface
5. wrote a second CGI to output Javascript
For a good time, see:
* a simple MyLibrary - http://infomotions.com/mylibrary/
* about Javascript output - http://infomotions.com/mylibrary/?
cmd=webmasters
Using this Javascript technique it is much easier to syndicate
MyLibrary content to other venues; it is important for libraries to
put their content where the user's are and not necessarily expect
users to come to our Web pages.
--
Eric Lease Morgan
University Libraries of Notre Dame
(574) 631-8604
|