Cannot call a Javascript API of Blackberry to a Web application hosted on a Tomcat server.

Hi all, I have been using Web work for development. I was able to build a webworks with HTML application, which in turn calls blackberry API using Javascript. However, when I move the HTML to a web application in a tomcat server, and calling the WebApp page from the WebWorks shell with all the permissions granted, I get an error TypeError: cannot convert 'undefined' in an object... Please advice if I am attemping is technically possible, or webworks serves only to write a native application using HTML hosted in blackberry.

If you host content from a remote domain requiring API access, you need to declare explicitly in the config.

You will need to create a piece of access as follows:

http://tx8zdflb30.xxxxx.com:8003" subdomains="true">


And then you add the elements of functionality for each of the APIs you want than this field/origin to have access to.

Tags: BlackBerry Developers

Similar Questions

  • Flash cannot call the javascript function in the local html file

    Hello!

    Us is to develop our first application on Playbook. It is an html file including a flash file and javascript code. Everything is packed in. in the file bar, a config.xml file and has been correctly loaded into the Playbook. Everything works locally (no web access)

    Everything works well except when we use an ExternalInterface.call("saveglobalscore",score) in flash that calls a javascript function in the .html file.

    In the actionscript3, we selected the "authorized local file access" and put the 'Security.allowDomain("*) '.

    Any ideas? Thank you!

    External interface tries to access the files packaged locally is currently a known issue.  I have not really of a calendar when or if this can be resolved.  It may be in the code base of flash.

  • Call a Javascript function in a Captivate 7 Web page

    Hello

    I try to call a javascript function in a web page to Captivate 7. The call is an output of blade event. When I saw the (F4) project, I have a prompt that displays a javascript function is called and told me to display in a web page. Of course, which is perfectly logical. However, when I go to the same project in the hml with the necessary Javascript function in page, I get nothing. The script is a simple that displays an alert.

    I made sure the SWF in question is defined in the global security settings. I know that the javascript function is correctly formatted.

    Can someone please give me an example of how to "execute Javascript" call of Captivate to a function residing in the html page please.

    Any help is appreciated.

    Don't just add the SWF file to the Flash security locations overall of confidence.  Add the entire folder containing all the files published, or better still, a level that contains all your published Captivate projects so that you never have to worry about Flash security issues again.

    Also, if it still does not work, I would try the same running JavaScript with a different event than the event output slide.  It can be a little bit reliable.

  • BlackBerry Smartphones test web application through BlackBerry Simulator.

    Hello

    I have to test my web application on a blackberry Simulator. My first question is: if it is possible to test any web application using the Simulator or I can test only the rich applcations of BlackBerry?

    I do the following:

    1. I downloaded Black Berry Email and MDS services Simulator 4.1.2 and BlackBerry_Simulators_4.7.0.78_9500 - Vodafone.exe.

    2A started the MDS Simulator first, then the BB Simulator.

    But I am not able to connect to internet, BB Simulator. Am I missing a config in the MDS Simulator.

    Help, please. This is urgent. TIA.

    Hello

    Open the rimpublic.property file. The rimpublic.property file is located in the following locations: \Program Files\Research In Motion\BlackBerry Email and Simulators\MDS\config of MDS

    Then add these commands in the section [MANAGER HTTP], update the following:

    application.handler.http.proxyEnabled = true

    application.handler.http.proxyHost = hostname

    application.handler.http.proxyPort = hostport
    application.handler.http.proxyUser = username

    application.handler.http.proxyPass = password

    application.handler.http.proxyAutoConfig = true

    application.handler.http.proxyAutoConfigURL = http://URL_to_Your_Config_File

    application.handler.http.proxyAutoConfig.ScriptCacheTime = 0

    Save these changes and to make with your steps... that will succeed to open a web application on your Simulator... more can know which web application (i.e. URL) that you want to test... I had the same problem, but somehow managed to open sites to Simulator after adding these commands. But my main concern is to open a URL in sector public siebel that is installed on a server in 9530 Simulator device. Can you/only you know which deals with the implementation of CRM siebel on simulators could you please suggest me doing this task.

    Thanks in advance

    Hochart

    India

  • Test a web application that uses the emulator of the Blackberry, is - it possible?

    Hello everyone,

    I have a small java web application running on Apache Tomcat on a local computer. It works fine on my PC, but it is meant for Blackberry devices. Before I put in our web server, I want to test it on a Blackberry 8300 and 8900 emulators. Is this possible? I developed this web application using spring on Netbeans IDE, i.e. no special tool Blackberry.

    I appreciate every tip and trick!

    Thank you.

    Mazen.

    Thanks again for your response,

    I did the Simulator works well, but in another installation of Tomcat and Eclipse-Tomcat-Blackberry Simulator running the port. ELL, it works unless I have some JavaScript problems, so :-)

    Thanks again

    Mazen

  • Deploy an icon on the BlackBerry smartphone to a web application or URL

    Hello

    I want to deploy an icon on the BlackBerry for a web application is home.  When the user click on this icon, I automatically want to launch my web app (URL).

    I found this article:

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800708/800655/How_To _...

    And I read about 'push channel browser', which seems to do exactly what I want to do:

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/7979/1181821/832210/Developi...

    I did a test with my Blackberry that is connected to a BES, and it works very well using the code example.

    My question is this, 'channel browser push' can be used for Blackberry that is not configured in our BES.

    For example, I want to be able to deploy an icon on the Blackberry from customers and suppliers we have, but these Blackberries are not related at all our BES or network.

    Is it possible to do this?  If so, should I do something special to make it work?

    If not, does that mean my only solution is to create a Java application that automatically launch the browser Blackberry (second option from the first link)?

    Thanks for your help!

    Channel browser push you make reference to requires the user is on a BlackBerry Enterprise Server.

    The alternatives to this is a Java application (as you have discovered), BlackBerry Widget or Signal of Web.  Web signals is the equivalent to a BlackBerry Internet Server Browser channel thrust.

    BlackBerry Widget SDK (applications requires a BlackBerry 5.0 device software)

    http://NA.BlackBerry.com/eng/developers/devbetasoftware/widgetsdk.jsp

    Web signals

    http://NA.BlackBerry.com/eng/developers/browserdev/websignals.jsp

  • The 193 Win32 API error. Cannot call the C function: private_load_AgCoreTest

    Hi guys,.

    When I try to run Lightroom, I get the following error messages:

    • Win 32 API error 193 ("(erreur inconnue)" ") when you call: load the getCFunction library
    • Cannot call the C function: private_load_AgCoreTest

    So I can't access my library or to make a new library by importing files.

    I run it on a laptop with Windows 10 64-bit, Nvidia GeForce 850 m GTX and a processor Intel Core i7 with 12 GB of RAM and a 500 GB SSD (Samsung 840 EVO). All with the latest drivers.

    I tried already to unninstall and reinstall the program, all my packages of Visual C++ and the dll. I also already checked my permissions for the folder from catalog and granted full access. I also tried to run Lightroom as administrator.

    None of these solved the problem.

    What should I do?

    According to the notes, they followed the instructions here to fix the problem: error: "unable to start correctly (0Xc000007b)"

  • Cannot call function AS3 from JavaScript

    Hello

    I am trying to call a function in ActionScript 3 with JavaScript. The problem that I can't get one of the browsers to trigger this AS3 function. Debuggers to say that the function is not defined when I call on the flash object.

    What is supposed to happen is - the javascript function calls the AS3 function and passes an integer value.   This integer is then used to remove one of the 20 funds sovereigns and load that into the flash movie.

    Please let me know if you can think of everything I can do to make it work!  I've been blocked for hours and can't seem to get there.

    Here are my actionScript:

    import flash.net.URLRequest;

    import flash.display.Loader;

    to import flash.external.ExternalInterface;

    var movies: Array = ["idle - ok.swf ',"idle - good .swf"];

    First, it loads it "Hello swf»

    var helloLoader:Loader = new Loader();

    var helloURL:URLRequest = new URLRequest ("idleAvatar.swf");

    helloLoader.load (helloURL);

    addChild (helloLoader);

    var setAvatar:Function = loadAvatar;

    ExternalInterface.addCallback("IsStatic",IsStatic) ("callSetAvatar", setAvatar);

    Then, this function must be called by JavaScript to load one of the other sovereign wealth funds.

    function loadAvatar(indx:Number) {}

    var url: URLRequest = new URLRequest(movies[0]);

    var ldr:Loader = new Loader();

    LDR. Load (URL);

    addChild (ldr);

    }

    Here's my JavaScript:

    "<script type="text/javascript"> ".

    function callExternalInterface (val) {}
    document.getElementById("loader").callSetValue (val);
    }
    < /script >

    Here is my embed code:

    <div >

    "" " <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="250" height="350" id="charger" name="loader"> .

    " <param name="movie" value="loader.swf"/ >

    " <param name="allowscriptaccess" value="always"/ >

    <!--[if ! IE] >->

    "" <by typeobject = "application/x-shockwave-flash" data= "loader.swf" width= "250" height= "350" > ""

    " <param name="allowscriptaccess" value="always"/ >

    <!-<! [endif]-->

    " <a href="http://www.adobe.com/go/getflashplayer_fr"> ".

    " <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player"/ >

    </a>

    <!--[if ! IE] >->

    < /object >

    <!-<! [endif]-->

    < /object >

    </div>
    "<a href="#" onClick="callExternalInterface (1)' >click ON < /a > ""

    You don't appear to be calling any function in your actionscript code.  Names between and inside are in disagreement.

    document.getElementById("loader").callSetValue (val);

    must call a function identified by the string "callSetValue" in your actionscript code, but you only have an identified with "callSetAvatar" and the function associated with the one on your side AS3 is specified as setAvatar...

    ExternalInterface.addCallback("IsStatic",IsStatic) ("callSetAvatar", setAvatar);

    but you do not have a function named setAvatar, you have a named loadAvatar

    Here is a link to a tutorial that can help you see how the functions are specified between actionscript and javascript using the ExternalInterface class.  He becomes confused, I suggest that you copy the code into a word processing file, so you can put clear where they have the same language between them.

    http://Viget.com/inspire/bi-directional-ActionScript-JavaScript-communication

  • call a javascript extension

    Hey

    I am very new to Blackberry/Java development if any help would be great.

    Using the tutorial on how to create blackberry javascript extensions that I wrote a very simple extension that will download a file from you.  Everything seems fine, I can export the JAR but I get the following in eclipse warning:

    Description Resource Path Location Type
    Signing Required: RIM Blackberry Apps API (0x52424200): Import uses protected Class net.rim.device.api.web.WidgetConfig ByteReaderExtension.java /TribalWorksByteReader-OS6/src/tribal line 5 BlackBerry Protected API
    

    When I try to use the extension to javascript in my application webworks, nothing happens.  Simply, it stops and does not receive from past the line, where I make my call.

    alert("before extension call");
    tribal.download.downloadFile(remoteFile, localFile);
    alert("after extension call");
    

    In the emulator, I get the first alert, but not the second.  I'm also a few calls from Dialog.alert in my extensions javascript that ever fire.  Kind of I'm stuck at this stage since there is no errors so I don't really know where to start.

    Someone knows something similar or know how I can fix this?

    Packer widget 1.5

    OS: 6.0.0.337

    Device: 9800

    I am also to build my javascript extension nuer Blackberry JRE 6.0.0

    Edit: I'm also compiling the application with bbwp.exe

    Thank you!

    Chris

    I thought about it.

    I used a file struggle to update the index.zip and compile it with bbwp.exe.

    I forgot to add the ext for the zip folder.

  • OS 10.3 / WebView: no interaction with the Google Maps Javascript API

    Hello

    Google Maps Javascript API no longer works correctly using the Web on OS 10.3.  On all the operating system previous releases everything worked perfectly fine in WebView but on OS 10.3 even if the plan (or view, or anything else provided by Google APIs) is displayed correctly, there is no interaction whatsoever with it - no response to taps, none is panoramic, no zoom, etc.

    I don't speak of the 10.3.0.698 Simulator - I do not have access to the true OS 10.3 device.

    Even simple examples of Google Maps doesn't work, try for example:

    import bb.cascades 1.2
    
    Page {
        Container {
            preferredHeight: 720
            preferredWidth: 720
            WebView {
                preferredHeight: 720
                preferredWidth: 720
    
    url: "https://google-developers.appspot.com/maps/documentation/javascript/examples/full/marker-simple"
            }
        }
    }
    

    The map appears, but there is absolutely no interaction with it - just a STATIC content.  On OS 10.2.xxxx, it works perfectly fine...

    P.S. If you open the same example URL directly in the web browser on OS 10.3 everything works well - responds to taps, she can be zoomed, panned, etc..    So, it's apparently a problem with user agent (which is probably the same web browser both webview).  Change the user agent in WebView to e.g. Z10 user agent doesn't help, either.

    Can anyone help?

    Your sample application does not seem to suffer the original bug, I thought. That bug could cause a WebView with no ancestor ScrollView would get too small window Visual and tactile input would be anchored to the Visual display window very small. If you want to learn more on this topic, see a tale of two windows - part for the discussion of Visual and updated display on the page. Perhaps your sample application it is OK because it specifies a preferredHeight for Web display, which can affect the used Visual display window.

    To be more precise, on a real device of passport BlackBerry running OS versions 10.3.0.1052 and 10.3.0.1154, the sample you provided responds perfectly to press ENTER.

    However, on the Simulator on OS 10.3.0.698, I can confirm input touchscreen does not work. Therefore a separate bug, which seems to be specific to the Simulator.

    I think you can be assured that end users will still be able to use your app (s) on a real passport of BlackBerry device, but it is unfortunate that it does not work on the Simulator.

  • Alertify Plugin - how to call via Javascript and not by a dynamic Action

    Hello

    Environment: Oracle APEX v4.2.1 | Oracle 11g R2 | IE8 Web browser

    Hoping someone can help, I use the plugin Alertify via a dynamic Action, but my question is, instead of use this via a dynamic Action, I actually want to make the same call I do via a dynamic Action but rather using javascript.

    So, by using a shape any JavaScript API in the Alertify plugin, I want to call an alert notification standard with the message and the delay effect until it disappears once more.

    Is it possible to call this plugin in this nature using javascript?

    Thank you.

    Tony.

    You can always use the plugin and a custom event.

    Create a dynamic action:

    • Event: Custom
    • Custom event: ALERTIFY_DELAY
    • Selection type: jQuery Selector
    • Selector: body
    • 1 real action:

    Add the following code to the section "run when Page Loads:

    window.setTimeout(function(){
      $('body').trigger('ALERTIFY_DELAY');
    }, 3000);
    

    This will cause the "ALERTIFY_DELAY" event fires after three seconds.

  • JavaScript API: How can I jump to the library page of the custom shop?

    I have the custom shop page, and I want to see the library page to begin the download process when the user presses the download button on the page of the custom shop. How can I complete these features with Adobe DPS Javascript API V2? Thank you.

    I found it by myself. Simply call adobeDPS.configurationService.gotoState ("library");

  • JavaScript API and Player control

    Spends hours searching in the forums, documentation and WIKI to see if I could find some answers in recent days.  Unofrtunately, so far, the data are rare.  Anyone can point me to the documentation on the Javascript API and what ara events available to control the player?  For example, how to send the player 'silence' on the volume of an event?  Or, how to send the player an event to "seek" to a point in time in the video?  Or, how to 'listen' to a point in time in the video and then use javascript to do something else (like playing another clip).

    I found some very sparse information about the use of JQuery, but, we do not use that (of least, not yet).  Simple javascript via an API is ideal.  Any help would be greatly appreciated.

    Hello

    The JavaScript API in Strobe Media Playback is exploratory. It will probably change in the future the press.

    We have the best 'documentation' is our samples. You can find samples in the html-template directory if you download the zip of the source. You can also view the source code of the live samples: http://osmf.org/dev/1.5gm/

    The simplest example is the following:

    http://OSMF.org/dev/1.5gm/Hello-World-JavaScript.html

    As you will see in the source code, you must pass the name of a JavaScript callback function that we will take care of all the player state changes.

    To call a method in the built-in player of StrobeMediaPlayback, you must call one of the methods of the API of the audiences of MediaPlayer:

    Player = document.getElementById (playerId);

    Player.MUTE ();

    Player.Seek (100);

    Note that play got renamed to play2() - because of security restrictions in Internet Explorer.

    You can also access the public properties in Media Player, by calling a getter function or the Set accessor:

    var State = player.getState ();

    player.setVolume (0.5);

    In the future we will probably explore more around the approach we currently used within the plugin jQuery, so if you have more time, I recommend that you look more closely at this implementation.

    Sorry to document is not that us will catch up on what we are approaching a stable implementation.

    -Andrian

  • Error when you try to call the Javascript function in the ActiveX Web browser

    I have a requirement to call a Javascript function in a web page that is displayed in the browser's ActiveX control.  I have the control on the front panel, and I use the Navigate method to call to the top of the appropriate page.  Based on an example, I found, I'm trying to get a reference to the HTML Document so that I can then get a reference to the Fenetreparent.  There is a method of the HTML Window object called execScript who I'm calling.  See the attached image of the code (reference close calls do not appear, but when I run it, they are there).

    I can't the node property that returns the parentWindow reference.  The error I get is the following.

    Error-2147467262 LabVIEW: (Hex 0 x 80004002) No. taken such interface supported.

    Any ideas on where to go from here?

    Hello

    I have reproduced the issue and the error you are seen and tried to understand what is the solution.

    It seems that the problem is with getting the pointer to the parentWindow.  From what I read on MSDN, it's maybe a limitation in the use of an ActiveX control in LabVIEW. It seems like Internet Explorer creates the object of the window, and so opening in one ActiveX control you free access to this top-level object.

    Here could be workaround for javascript execution in your program:

    I would like to know if it works for you and if it will work in your program.

  • Cannot call dllinstall function... on IE8 with WinXP webcheck.dll error message

    Hello

    I get the error message after logging in my machine.

    Cannot call dllinstall function in the c:\windows\system32\webcheck.dll file as the dunction does not exist or is not supported.

    I made no changes at all to do this. Using XP SP3 and IE8.

    Concerning

    I fixed that.

    had to go through the process of elimination, disable startup items.

    turned out to be problem Webcam live messenger.

    uninstalled and the problem disappeared.

Maybe you are looking for