Does anyone know how to run javascript from Revolution?
I hava some javascript code i want to use to email with.
Do i just put it into a field and run the command "do fld "Field_JS" as javascript"....
Javascript.....
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Hi Christopher,
Your general idea is correct, you would use the 'do <script> as <language>' construct to execute a script in another language than Revolution.
But first you have to make sure that Javascript is supported on your platform. You can check the global property 'the alternateLanguages':
On MacOSX, you'll get a list of the OSA-compatible languages that were installed - OSA stands for Open Scripting Architecture, and is the underlying mechanism which allows you to automate tasks using AppleScript and other OSA-compatible languages.
On Windows, Revolution 2.9 will add support for the Windows Script Host system - a system similar to OSA, which allows scripters to automate COM-enabled applications and libraries.
On this Windows XP machine, among other languages, such as VBScript, I get "JScript" - which is the Microsoft implemenatation of ECMAScript, the official name for Javascript.
In short, there's no built-in Javascript, but you can use OSA/WSH to execute scripts in alternate languages, provided they are installed.
Hope this helped,
Jan Schenkel.
Your general idea is correct, you would use the 'do <script> as <language>' construct to execute a script in another language than Revolution.
But first you have to make sure that Javascript is supported on your platform. You can check the global property 'the alternateLanguages':
Code: Select all
answer the alternateLanguages
On Windows, Revolution 2.9 will add support for the Windows Script Host system - a system similar to OSA, which allows scripters to automate COM-enabled applications and libraries.
On this Windows XP machine, among other languages, such as VBScript, I get "JScript" - which is the Microsoft implemenatation of ECMAScript, the official name for Javascript.
In short, there's no built-in Javascript, but you can use OSA/WSH to execute scripts in alternate languages, provided they are installed.
Hope this helped,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com