Page 1 of 1

Calling a JavaScript function in the browser control from LC

Posted: Wed Apr 25, 2012 12:35 am
by BarrySumpter

Code: Select all

<script type="text/javascript">

function myfunction(txt)

function myfunction2()
alert('Who Dat Be?');


<input type="button" onclick="myfunction('Hello')" value="Call function">

<p>By pressing the button above, a function will be called with "Hello" as a parameter. The function will alert the parameter.</p>


Code: Select all

on doCallBrowserFunction
   MobileControlDo sBrowserId, "execute", "myfunction('sup dude!')"  
   MobileControlDo sBrowserId, "execute", "myfunction2()"    
end doCallBrowserFunction