Is it possible to change the revlet embed html?

George C Brackett gbrackett at
Thu Dec 3 13:18:22 EST 2009

Thanks very much for your advice and script!  They confirm my understanding of this new territory.

I would like to do something just slightly different, though. I would like the embed code to pick up the revlet's URL from server variables ($HTTP_HOST & $REQUEST_URI), not from a fixed path. I see now that this would require the revlet to be running from a webserver, not a file server, but I can handle that issue. I haven't tried this approach yet, but recent posts suggest it's possible.

I would also like not to have to replace the html page after it is created by the IDE, but to pre-create it (hmmm - sounds sort of god-like) in the location the IDE uses to store its template. I don't know if that's possible, but it would streamline the process.


On Dec 3, 2009, at 1:02 PM, J. Landman Gay wrote:

George C Brackett wrote:

> One way to enable students to produce information-handling projects
> for themselves (where information is entered, stored, edited,
> deleted) would be giving them an environment where the URL of the
> revlet is passed by parameter to the revlet code, and including a
> pre-written 'save' command in a project starter stack that can write
> the information to a text file at the revlet's URL. A big help would
> be to alter the standard test HTML so that the embed code passes that
> information.
> Is it possible to change the test HTML generated by revMedia?

Sure, and you can do that yourself easily. The HTML file is created in the same folder as your revlet after you do a build. Just alter that.

You need to add a parameter to the javascript section. You can name it whatever you want, and give it the value of the URL where you will be storing the revlet on the server. Then in your stack, call "the revletParams of this stack" to get a list of all those parameters that the javascript has passed.

For example:

<object classid="CLSID:B2EC94AF-4716-4300-824A-3314BF23664A" width=640 height=480>
	<param name="src" value="myMain.revlet"/>
	<param name="stack" value="myMain"/>
	<param name="requestedName" value=""/>
	<param name="instanceID" value=""/>
	<param name="myPath" value=""/>
	<embed type="application/x-revolution"
		width=640 height=480

For saving, you'll need to use scripts that act like desktop apps; the revlet's defaultfolder is on the user's local hard drive, not on the server. You can think of revlets as mini standalones, for the purposes of file paths. You'll need to use an FTP URL that includes a user name and password if you want to write to the server.

Jacqueline Landman Gay         |     jacque at
HyperActive Software           |
use-revolution mailing list
use-revolution at
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list