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

[REBOL] Re: Can REBOL change HTML of a web page?

From: inetw3::mindspring::com at: 31-Mar-2005 21:06

Hi Rodrigo, I don't know exactly what you are needing but the Rebol/plug-in can be used to retrieve data from the web-page and based on your rebol script, it can be processed as needed. There are many ways to do this and without CGI scripts. But what the Rebol/Plugin brings is the ability to act as a full blown webpage server. Remember the plugin is limited to IE-Mozilla-Firefox, and there is no limit to what this plugin can achieve or do to or from a single webpage. (security issue) The trick is you must use javascript with XML-DOM (DHTML) or the .innerHTML (easier) functions to get the page's data. Look at the Rebol/Plugin webpage for an idea how to do this. Put this javascript in your rebol script and the rebol script in the rebol/plug-in code. When the plug-in loads, have the javascript part inserted into the webpage. How? Give each webpage a "<script>" tag with an ID name. ie.. <script id="update"></script>, and this is where you want the rebol/plug-in to put the javascript. You can read or write to the page or anywhere else that you need the returned data to go to. How do i get Rebol to respond to get new data from the page? Just like a form has a submit button, you can make the Rebol/ plugin viewable as a button with text that says something like update/retrieve data . just and idea. Another way is to just have regular javascript code in your page write all your needed info into the DOM, (Document object model) and then use a Rebol script (maybe quickparser.r at ) in the plugin to parse the needed data right out of the page and do with it as you please.