Two On-Rev Scripts on One Web Page

Devin Asay devin_asay at byu.edu
Wed Sep 15 12:10:28 EDT 2010


On Sep 15, 2010, at 10:02 AM, Gregory Lypny wrote:

> Hello everyone,
> 
> I have an On-Rev script called from an HTML markup item in a web page.  It works fine in that the information I want generated is displayed.  I call the script like this (thanks for help with the syntax, André):
> 
> 	<?rev include "../myScript.irev" ?>
> 
> The trouble is, if I put the exact same statement in another HTML markup item anywhere else on the page, nothing is displayed and other static text items on the page are blanked out.  The implication seems to be that more than one reference, using Include, to On-Rev scripts cannot exist on the same page.  Is that correct or am I doing something wrong (likely)?  If the second item does not use an include statement to reference a script but is a script itself, then there is no problem.  For example,
> 
> 	<?rev put the long date && the long time ?>
> 
> works fine on the same page with myScript.irev.
> 
> Any thoughts?

Gregory,

I'm not the expert on revServer scripting by any means, but as far as I know you only need to issue an include statement one time for any given page. The included file should then be available to any script segments on the page. I find it really helpful during development to enable inline error reporting:

<?rev set the errormode to "inline" ?>

That will show any errors generated by your rev code.

HTH

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list