469,602 Members | 1,715 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

Capturing output from a script to a variable

I have a device that came with a perl script that will control the
opening and closing of relays and also return their current state. I
have the script running as a server side include. The state is correctly
output in the document, but I need to base other code on the return
value. i.e.:

<!--#exec cmd="/lock/scripts/wps.perl localhost:80 user:password 2status"-->

will return either:
2 ON

or

2 OFF

How can I get this return value into a variable?

Thanks,

...kurt
Feb 7 '07 #1
1 1365
kurt wrote:
How can I get this return value into a variable?
The following might work:

var relayStatus ='<!--#exec cmd="...."-->';
JW
Feb 7 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by jerrygarciuh | last post: by
4 posts views Thread by Mark Wilson CPU | last post: by
5 posts views Thread by Mike | last post: by
5 posts views Thread by Moosebumps | last post: by
1 post views Thread by ebobnar | last post: by
2 posts views Thread by Ken Cox - Microsoft MVP | last post: by
6 posts views Thread by Ed Leafe | last post: by
2 posts views Thread by gopala | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.