Calling a VI as ActiveXObject using Javascript

Hello,
I would like to control a Labview-VI (Version 7.1) from a Javascript-program by using the ActiveXObject-model.
It looks like that:
    lvapp = new ActiveXObject("Labview.Application");
    viPath = "C:\\test.vi";
    vi = lvapp.GetVIReference(viPath);   // Load the vi into memory
    vi.FPWinOpen = 1;                               // Open front panel
    var paramNames = new Array(["Input","Output"]);   // create array with parameter names
    var paramVals  =     new Array([125,0]);                       // create array with parameter values
    vi.Call(paramNames, paramVals);    // call Labview  --> error occurs here
    alert("Result from LV:"+paramVals[1]);
Starting Labview and loading the VI works fine. The scripts stops during the "Call"-methode.
Problem is, that an error occurs which indicates that VI-object does not unterstand
the Javascript array structure ("expected 1D-array"). If I call theVI without parameters everything
works fine, but this makes no sense since I cant exchange data with LV.
The same programm coded in VisualBasic-Script worked fine also.
Is there anyone who knows of which type parameters for "Call"-mehode must look like in
Javascript?? Every hint is welcome.
Regards

Sorry, this replay was submitted befored finished...
Hi Brian
That was the hint I looked for:
  > The only other thing you could do would be to use the SetControlValue/GetControlValue to do the I/O one control at a time.
Since I stranded to create the mentioned SAFEARRAY of VARIANTs I tried it with the following way:
   lvapp = new ActiveXObject("Labview.Application");
    viPath = "C:\\test.vi";
    vi = lvapp.GetVIReference(viPath);   // Load the vi into memory
    vi.FPWinOpen = 1;                               // Open front panel
    vi.SetControlvalue("Input",125)       // set the input parameter, 125 is just a sample
    vi.Run();                                               // run the VI here, the"Call"-methode without parameter does not work since it uses
                                                                  // the defaults of the controls
    var paramNames = new Array(["Input","Output"]);   // create array with parameter names
    var paramVals  =     new Array([125,0]);                       // create array with parameter values
    vi.Call(paramNames, paramVals);    // call Labview  --> error occurs here
    alert("Result from LV:"+paramVals[1]);

Similar Messages

  • Build/call Query URL with selections using JavaScript???

    I have created a web query to list specific materials and each row has a checkbox for the user to select which materials they would like to work with.  Once they push the "Submit" button I have collected the materials they selected into a Javascript array. 
    I would now like to call a different query with the materials selected as a filter.  Can anyone show me how to build an URL to call the query and use the materials as a filter?  There could be 10 or 20 selected materials...
    Thanks for any direction you can provide!

    Hi,
    the form should look like this:
    <form action="<SAP_BW_URL>" method="post">
    <input type="hidden" name="CMD" value="LDOC"/>
    <input type="hidden" name="QUERY" value="yourQueryname"/>
    <input type="hidden" name="INFOCUBE" value="yourInfoCubename"/>
    <input type="hidden" name="FILTER_IOBJNM" value="0MATERIAL"/>
    <input type="checkbox" name="FILTER_VALUE_1" value="Mat1"/>
    <input type="checkbox" name="FILTER_VALUE_2" value="Mat2"/>
    <input type="checkbox" name="FILTER_VALUE_N" value="MatN"/>
    <input type="submit" value=" Submit "/>
    </form>
    form Method has to be post because of url length restriction!
    Heike

  • How to call a batch file in Mozilla using javascript

    With the following code snippet
    WshShell = new ActiveXObject("WScript.Shell");
    WshShell.Run ("c:\\Windows\\system32\\Notepad.exe",1,true);
    it is working fine, but not in Mozilla.
    I want to call batch file in Mozilla using javascript.
    can some body suggest on this?

    I found that already. Eventhough that is slightly differ from yours.
    .exec("cmd /c start x.bat");
    Anyhow
    Thanks yarr.
    My E-Mail ID is [email protected]

  • How can I call a web service using JAVAscript in LCD

    hi guys,
         I know it can call a WSDL in LCD, but I have not any WSDL web service , and I have a REST web service ,how can I call this REST web service in LCD? I checked some documents and found nothing...if it's possible that it can call a REST web service using JAVAScript code, I mean I can program some code to call this web service ?
    thanks,
    Jesse

    Hi Jesse,
    You can do GET, PUT and POST using FormCalc, so you should be able to access a REST web service. 
    There is a example of accessing a RSS feed in this thread, http://forums.adobe.com/message/5695433#5695433
    Regards
    Bruce

  • Using javascript to call a signed applet's read/write functions problem.

    Hi, I wan't to use javascript to call the read/write functions of my signed java applet.
    The applet can read/write fine, if its called from inside the applet, but when I make public functions to do the read/write and then call those functions from javascript, i get the old security exception.
    Has anyone done this before?
    Thanks

    From what I understand is that for example file IO can only be done if the current method
    has this privilege and the stack that called the current method had this privilege.
    Javascript doesn't have any privilege and calling methods that do file IO directly from
    javascript should not work, this bug was fixed in 1.4.2.
    The workarround AccessController.doPrivileged(new PrivilegedAction() { might allso be
    fixed in later versions since changing the privileges of currently executing code is
    someting that should not be possible when the currently executing code is called from
    "untrusted" (javascript) code.
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post

  • Web service call using javascript

    Hi All,
    I am working on web service call using javascript. I used below code while calling web service on click event of button.
    var e;
    try
         var oListURL = "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL";
         SOAP.wireDump = true;
         var service = SOAP.connect(oListURL);
         xfa.host.messageBox(service.toString());
         if(typeof service != "object")
              xfa.host.messageBox("Couldn't connect to " + oListURL);
         if(!service.ConversionRate(138,56))
              xfa.host.messageBox("The ConversionRate method does not exist on the service at " + oListURL);
         //call the service
         var svcResponse = service.ConversionRate(138,56);
         xfa.host.messageBox(svcResponse.toString());
         if(!svcResponse)
              xfa.host.messageBox("The service returned nothing");
    catch(e)
         xfa.host.messageBox("Exception: " + e);
    I do not get any response for it. I always get "0" as response.
    How do i passed session id to soap header while calling web service in designer??
    Is there any other adobe javascript with which i can call web service as well as i may able to provide session id to its soap header.
    Request you all to share any information regarding this.
    Thanks in advance.
    Regards
    Abhishek

    Hi Abhishek,
    This service seems to take the country codes as parameters, not the numerics 138,56, and I have always passed in the parameters as xml.
    So I have just tried;
    var svcResponse = service.ConversionRate("<FromCurrency>AUD</FromCurrency><ToCurrency>NZD</ToCurrency>");
    and got a response
    1.2557
    Which is about right.
    Hope this helps
    Bruce

  • Call objective c Method using javascript

    how can i call objective c mehod using javascript..........

    If the JavaScript is running in a browser or UIWebView on iOS, you cannot. Allowing direct access to the native API would be a huge security vulnerability.
    As an alternative, there are development frameworks such as PhoneGap that allow developers to access some native iOS features (such as Contacts, Camera) from JavaScript by using a runtime that includes a foreign function interface. The app must be deployed to the device, bundled with the runtime.

  • Branch process using javascript to call popup

    I am on Windows Vista, Oracle XE and Apex 3.1.0.00.32.
    The branch works when using region based button.
    I wanted to use a "button displayed among this region's items" for a "button" list in the sidebar. I created a button and used a branch based on :REQUEST = 'button_name'. The branch fires but I get an error "Internet Explorer cannot display the webpage."
    HTML header code
    <script language="JavaScript" type="text/javascript">
    function popup(pURL, pwidth, pheight) {
    html_PopUp(pURL,"winLov",pwidth,pheight);
    </script>
    Branch Code
    javascript:popup('f?p=&APP_ID.:10012:&APP_SESSION.:&REQUEST.::10012:P10012_ISS_ID:&P10011_ISS_ID.',500,350);
    Since the code works in the URL redirect on a Button in a region position but not in a Branches redirect to a URL I assume this functionality does not work? Can anyone shed light on this? If it doesn't work I will need to find another solution....
    Thanks,
    Sam
    I did search and found a thread that intimates it should work.
    link:calling javascript on a branch is this possible
    Edited by: slavanaway on Mar 23, 2009 4:14 PM

    Luis,
    I see that I did not put more detail into the issue than the title.
    I am trying to call a popup from a button among region items. The user makes a selection then some custom DDL fires and the popup closes and the calling page is refreshed.
    A button among region items does not have a redirect to URL like a button in a region position. So I made the branch that was conditional on the button. I think I knew that a "branch" is server side. I don't understand why the jvascript URL does not work.
    A button in a region position and a list that redirects to a URL both work. I wanted the list to look like button in a vertical row.
    I now have the functionality working with a list.
    So I am coming to the mountain to get enlightenment. The Branches on a page can not use javascript is my guess and being eternally curious I was wondering why. I hope knowing will help me save time and produce better apps in the future.
    As for the actual behavior. When the Branch for the button amonth the region items fires. I would get the error message and the URL would only show apex flows. I don't have the exact URL as I dis-assembled the list and branches.
    I think the branch goes to the server but either the javascript is not passed or it does not handle the javascript.
    Tx,
    Sam

  • How to call a url using javascript

    Hi friends
    Iam a newbie i have a requirement
    i have to call some n number of URL using javascript i have all my url in one table .... i have to call all the url from that table ... and the output of the url should be saved in a flat file...The output of the url is in XML format... can any one please suggest me in doing my task ... and one more thing in which tool can i run the javascript coding...please give me ur suggestion and idea how it can be done ....
    My URL for example ll be like this as shown below wen i run this url it ll give me an XML format output
    HTTP://www.myserver.com/ev_api.action?user_id=<username>l&password=<password>&statevar=history&cutoff=<date>&id=<id>
    Thanks in advance
    Thiliban

    thilib wrote:
    In this OTN is there is javascript forum can please give me the link for it
    Thanks
    thilibJust to rephrase Walter's reply: there is no javascript forum in OTN!

  • Calling a URL using JavaScript even handler

    When I'm trying to call another URL using JavaScript, it doesn't work.
    I did following things,
    1).Created a Button
    2).In javascript event handler, I'm calling Javascript function doSearch()
    3). I wrote this function in Header Text Section of the Form Tex as below
    <SCRIPT language="JavaScript">
    function doSearch() {
    location="http://www.oracle.com"
    </SCRIPT>
    When I saw the source of that button, it shows me as following,
    --<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD>
    <INPUT TYPE="BUTTON" NAME="FORM_TO_CALL_CUSTOM.DEFAULT.CALL_REPORT.01" VALUE="CALL_REPORT" onClick="doSearch(); do_event(this.form,this.name,1,'ON_CLICK','');">
    </TD></TR></TABLE></TD></TR></TABLE>
    But, it doesn't call that URL.
    Plz. guide me.
    null

    Sorry, the code for the CALL_Report button is as follow.
    --<Tab BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD>
    <INPUT TYPE="BUTTON" NAME="FORM_TO_CALL_CUSTOM.DEFAULT.CALL_REPORT.01" VALUE="CALL_REPORT" onClick="doSearch(); do_event(this.form,this.name,1,'ON_CLICK','');">
    </TD></TR></TABLE></TD></TR></TABLE
    null

  • Use javascript to call actionscript

    Hello There,
    I have been using a really nice setup, from Phillip Hutchison
    to communticate from Captivate 3 using code swfs on a captivate
    slide that will communicate back to AS3 from AS2 (due to captivate
    3) via an as2 proxy .
    Would there be a way that I could use javascript on a
    captivate button (or object) that would call a function via the
    same process? Another way to say this, can I call an external
    callback function from javascript on a captivate button?
    Any tips will help,
    Thanks,
    eholz1

    Would there be a way that I could use javascript on a
    captivate button (or object) that would call a function via the
    same process?
    Yes.
    1. Create a function (say myJSfunction )inside the html(that
    loads the final CP swf.).
    2. Have the code to call the external interface function
    within myJSfunction.
    3. Set the action of button to execte JS and just have the
    java script as "myJSfunction();"
    4. Insert your code swfs on a captivate slide that will
    register the external callback function.
    Now when you click the button myJSfunction gets called which
    will call the external callback function inside your code swf.
    Also note that with CP4 you can publish directly to AS3 so
    you wont need to use the proxy any more.

  • Calling url without using javascript

    Hi all,
    In my BSP application, I need to call url in a popup or in the application itself without using javascript.
    My requirement is the url should not be visible to the users. For this, if a javascript is used the url would be visible to the users whereas if the url is called in the BSP application itself then only BSP url would be visible.  Can anyone suggest some methods to call url in a BSP application?
    Thanks and Regards,
    Sneha.

    Hi Sneha,
    you can have ABAP make the HTTP request then just pass the response directly back to the web client.
    Sample of how to make a HTTP request can be found at http://help.sap.com/saphelp_nw04/helpdata/en/e5/4d3514c11411d4ad310000e83539c3/frameset.htm
    Cheers
    Graham Robbo

  • How can I call actionListener using JavaScript

    Dear Programmers
    I have to use javascript in order to call a specific actionListener when a window is close. Therefor I inserted the following code to the jsp:
    <script type="text/javascript">
    window.onunload = function(){......};
    </script>
    But how can call a specific actionListener? I saw that I can use submit(), but this method doesn't perform any actionListener. I didn't find where the actionListener is specified after doing "view source" on the browser.
    Please help me

    Hello,
    I think you can do this:
    <h:form id="formId">
    <h:commandButton id="buttonId" actionListener="..." />
    Then you can call:
    document.forms.formId['formId:buttonId'].click();
    to invoke the action listener. If you don't want to display the commandButton on screen, you may apply a css style to hide it.
    Billy

  • Getting error in Mozilla, reading xml using JavaScript

    Hi All,
    I am working with javascript with xml, getting error in Mozilla
    1. see html and xml file and check xml file path before test ---
    2. please, go through the html and xml file.
    read_xml.html
    =================
    <html>
    <head>
    <title>xml file using javascript</title>
    <script type="text/javascript">
    var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    //loading xml file
    function doLoadXML(xmlFile)
    xmlDoc.async="false";
    xmlDoc.onreadystatechange=doStateVerify;
    xmlDoc.load(xmlFile);
    rootData=xmlDoc.documentElement;
    function doStateVerify()
    if (xmlDoc.readyState != 4)
    return false;
    // reading xml file
    function doReadXML()
    alert("calling function");
    doLoadXML("C:/Documents and Settings/webdeveloper06/Desktop/for_test/comp-info.xml");
    alert("loading file...........");
    var dataArr=new Array();
    dataArr=xmlDoc.getElementsByTagName("comp-info");
    for(var m=0; m <= dataArr.length-1; m++)
              alert("entering inside looping here");
              document.write("<Table border='1px'><tr><td>");     
              document.write(dataArr[m].getElementsByTagName("name")[0].firstChild.nodeValue);
              document.write(dataArr[m].getElementsByTagName("description")[0].firstChild.nodeValue);
              document.write(dataArr[m].getElementsByTagName("web-addr")[0].firstChild.nodeValue);
              document.write(dataArr[m].getElementsByTagName("address")[0].firstChild.nodeValue);
              document.write(dataArr[m].getElementsByTagName("city")[0].firstChild.nodeValue);
              document.write(dataArr[m].getElementsByTagName("postal-code")[0].firstChild.nodeValue);
              document.write(dataArr[m].getElementsByTagName("country")[0].firstChild.nodeValue);
              document.write("</input></td></tr></table>");
    </script>
    </head>
    <body>
    <input type="button" value="Display XML Data" onClick="doReadXML()" />
    </body>
    </html>
    com-info.xml
    =========
    <?xml version="1.0" encoding="iso-8859-1"?>
    <itcopany>
    <comp-info>
    <name>xxx</name>
    <description>IT Reaserch Company</description>
    <web-addr>http://xxx.com</web-addr>
    <address>mehdipatnam</address>
    <city>Hyderabad</city>
    <postal-code>777888888</postal-code>
    <country>IN</country>
    </comp-info>
    <comp-info>
    <name>yyyyy </name>
    <description>Non IT Company</description>
    <web-addr>http://yyyy.com</web-addr>
    <address>xyxxyxyx</address>
    <city>Banglore</city>
    <postal-code>78878787878</postal-code>
    <country>IN</country>
    </comp-info>
    <comp-info>
    <name>zzzzzzz</name>
    <description>IT Company</description>
    <web-addr>http://zzzzzzz.com</web-addr>
    <address>secondrabad</address>
    <city>Hyderabad</city>
    <postal-code>9999999999999</postal-code>
    <country>IN</country>
    </comp-info>
    </itcopany>
    output status
    ============
    1. getting output in IE
    2. not getting output in Mozilla
    Can anyone Helpout, To get data in Mozilla
    regards,
    Abu

    Try to check this document Browser Support for SAP and use PAM (Product Availability Matrix) to check for the compatibility of your SAP system with the browser.
    If you are only the user of the Web Dynpro you would have probably no other choice than change the browser.

  • How to pass value to pop up window using javascript function?

    I am not sure how to do this, I want to open new window from existing form,This is Mod/PLsql for consists some javascript functions also. When I am clicking on new window in form then new form should open with results of value entered,but new window form is opening with main page :( , not able to get text box value from parent form. How to call textbox input value in popup window from parent window using javascript?
    currently I'm using following code:
    HTP.p('<script type="text/javascript">
    function pop_up5()
    var l_url=window.opener.document.getElementById("p_single_store_pc").value;
    window.open(l_url, '''', ''fullscreen=no, scrollbars=1'');
    </script>' );
    Edited by: user11970612 on Jun 14, 2012 5:02 AM

    this is probably due to the Javascript code and not a "real link" to another page... I don't know if the null is due to the Javascript...
    But if you really really want to use javascript instead of a ... you can pass the location of the url with JSP (on your main page) as a parameter to the open window... (...) u can put instead of main.jsp <%= request.getServerName()+request.getRequestURI() %>
    the value <%= ... %> will return something like test.com/html/main.jsp
    Hope this helps.

Maybe you are looking for

  • Windows LIVE on Nokia N80

    Hi, Yesterday my Windows Live for Nokia S60 version 1.0.8161, stopped working. Also My MSN on windows 2000 Pro, stopped working, but after looking at : http://www.microsoft.com/technet/security/bulletin​/ms07-054.mspx and update to build 820 it worke

  • Help setting up windows auth for lighttpd/ldap etc

    I'm running a server on my office that I only have accessible to people in our workgroup. I'd like to set it up to authenticate into our windows domain for ease of password management. I havent been able to get ldap working..and was wondering if anyo

  • Can a .rar file be used to zip a Mac file?

    I've got a bunch of .rar files that are supposed to make up one big Mac file, but I've never heard of that being possible..always thought that's only a PC zip format....anyone know otherwise? If so, how do you unzip 'em? thanks

  • Skipping Pages in Reports

    I have a report which has a simple select statemet 'select * from emp' .. Grouped by dept... and i gave maximum records per page =1 When im printing the report im printing on both sides of the page(A4 size).... My problem is i want to print each dept

  • Incremental Backup question

    Hi, I have a hot backup taken every wednesday and archive log backups taken every day. (using RMAN and netbackup). Oracle is 10.2.0.3 and OS is RHEL4. Do I still need or (will it be helpful to have ) incremental backups? What is its purpose? Will the