Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] [Plugin] is cool

From: hallvard:ystad:oops-as:no at: 21-Apr-2004 0:22

Hi, The plugin module for MSIE is cool. And with the javascript access to the browser's DOM tree, interesting things can be done. I've added a feature to the rix search engine: plug the scripts in directly. So if you get "plugable" results from a search (e.g. http://www.oops-as.no/rix?q=plugin&st=sfh), there will be a link with the words "plug it in!". Once you click it, you get to see the script as a plugin right away. But. How can I know the width and height parameters of all rebol scripts? I can't. But these parameters can be set from inside a plugin script thanks to 'do-browser. Here's how you do it: do-browser {document.getElementById('RPluginIE').width=100; document.getElementById('RPluginIE').height=100;} This example sets both width and height to 100 pixels. (Isn't it funny how rebol in this case must use a javascript to set it's own parameters?) Width and height should of course be whatever suits your script best. If all scripts contained these lines, my new rix feature would be even cooler.... For those who would like to have your scripts indexed, but not plugged in, consider this: do-browser {top.location.href="http://www.rebol.net/plugin/demos/anamonitor.html";} OK, time to go to bed. HY