Path: news.mathworks.com!not-for-mail
From: "Michele " <denber.nospam@mindspringNOSPAM.com>
Newsgroups: comp.soft-sys.matlab
Subject: Calling Javascript function from Matlab
Date: Sat, 13 Oct 2007 06:06:14 +0000 (UTC)
Organization: Michele Denber (ID: 1-A7A3B)
Lines: 16
Message-ID: <fepn8m$ot3$1@fred.mathworks.com>
Reply-To: "Michele " <denber.nospam@mindspringNOSPAM.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1192255574 25507 172.30.248.35 (13 Oct 2007 06:06:14 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 13 Oct 2007 06:06:14 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 174773
Xref: news.mathworks.com comp.soft-sys.matlab:432737


I have a Z-Wave home automation controller that comes with a
web server that offers up a page with buttons like "ON" and
"OFF" for controlling lights.  These buttons run Javascript
functions so for example, when you mouse-click the OFF
button in the browser it runs this Javacript:
onclick="goOff(1);"

I want to control the hardware with Matlab, but my only
interface is via the web server.  Is this even possible?  Is
there some way for me to have Matlab execute a "goOff(1)"
command or any of the other Javascript functions defined on
the web page?

Seems like it ought to be possible, but I'm drawing a blank
on how to get Matlab to run the Javascript.  Any help would
be most appreciated.  Thanks!