Embedded mt scripts [WAS Re: Text editors]
andu
undo at cloud9.net
Mon Apr 29 15:15:01 EDT 2002
J. Landman Gay wrote:
> On 4/28/02 10:52 PM, Scott Rossi wrote:
>
>> So far, MC & REV do not run within Web browsers. You can build Web
>> enabled
>> stacks and use MC/REV as a helper application for a browser, but you
>> can't
>> run MC/REV embedded within a browser.
>
>
> I have (maybe) discovered a work-around for this problem. Some of you
> may remember that I have been trying to embed the output from an mt
> script into an html document. I think I may have figured it out -- and
> if Simon can implement his text editor as an mt script on the server,
> the following solution may provide what he needs. I've been working on
> this off and on for weeks and the eureka factor this morning when it
> finally came together was substantial. :)
>
> I'll preface everything with the caveat that I've only tested the
> following on my Mac in OS X so far, and I only have a couple of browsers
> to test with. I'd appreciate input from anyone who tries the technique
> with other browsers, especially older ones.
>
> In all versions of Netscape and Mozilla, and possibly older versions of
> IE (I haven't got an older version to test with,) the "object" tag
> appears to work:
>
> <OBJECT data="http://www.myserver.com/cgi-bin/echo.mt" width="400"
> height="800"></OBJECT>
>
> The height and width parameters are required. The browser will add
> scrollbars if necessary. You can add other parameters to control
> alignment or other things if you want. That's all it takes to embed the
> output from echo.mt into an html page.
>
> Of course, newer versions of IE don't support it (I'm testing with IE
> 5.x for Mac and it doesn't work there.) Either Microsoft decided to
> implement their own definition of the "object" tag, or I am missing some
> required parameters. I have read that IE requires the "classid"
> parameter (which Netscape doesn't,) and the W3W specs say that the
> classid can be a URL to the data, but IE doesn't appear to use it unless
> it is a classid that has been registered with Microsoft (grrr). If
> anyone knows how to get around this and make the object tag work, I'd
> like to know about it because the object tag has been around a long time
> and is supposedly supported by almost every browser.
>
> Then today I discovered the IFRAME tag -- which works in Netscape,
> Mozilla, and IE, at least, in newer versions of those browsers. This
> will embed the output of echo.mt into an html document:
>
> <IFRAME src="http://www.myserver.com/cgi-bin/echo.mt" width="400"
> height="800" scrolling="auto" frameborder="0">
> [Alternate text here for browsers not configured to display frames.]
> </IFRAME>
>
> You can adjust the scrolling, frameborder, and a number of other
> parameters to fit the needs of the page. This method works great in
> browsers that support the IFRAME tag, though browsers that don't support
> frames won't show anything.
>
> Now something even cooler: Mozilla and Netscape 6 allow you to embed
> your own custom tabs into the browser's sidebar display -- those are the
> tabs on the side that load dynamic data and which are always available.
> I customized my tab configuration to include a module that loads my
> custom html document containing the IFRAME tag. My custom mt script
> reports information about the sizes of my mail inboxes on the server.
> Since I let old mail pile up there for a while, I like to know how large
> the spool files are so that I know when I should delete them. Whenever I
> want to check the size of my inboxes, I just open my custom browser tab
> in Mozilla and it loads the current information. Instant gratification.
>
> I actually have MetaCard running three custom mt scripts for me now. Not
> only will it scan and report on my mail inboxes, but another script also
> backs up my access logs every so often (because I rarely remember to
> download them before my ISP deletes the old logs every week) and a third
> mt script deletes large mail inboxes whenever I say -- which I do by
> simply clicking on a link I've saved as a bookmark in my browser.
>
> The ability to control stuff on my server via MetaCard and display it in
> a browser is really exciting. Hope this helps anyone else who has been
> trying to embed mt output. Who needs Perl? :)
>
I'm a little confused about the use of "embedded" and would be nice if
you could do a demo web page with the above.
From what I understand, the display doesn't go beyond the html
possibilities unlike a java implementation which would allow for custom
widgets and behavior. I don't mean to say that your solution is not
definitely a more elegant way of doing it then the html templates I use
for script generated web pages.
--
____________________
Regards, Andu Novac
More information about the metacard
mailing list