Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Embed object .setDevice function not working in Chrome

    Hello,

    I am attempting to implement a javascript joystick plugin. The project has a google code page located at: http://code.google.com/p/javascript-joystick/

    After installing the plugin, the javascript works flawlessly in IE and FF, however chrome has some issues with executing it. A hosted version of what I am having trouble with can be found at http://www.jimmyblaze.net/joytest/simple.html

    The issue seems to be with a snippet of code from the main script that attempts to create an object and embed it on the page. The trouble area can be found here:
    Code:
    try {
                ctrlFF.type = "application/x-vnd.numfum-joystick";
                ctrlFF.width  = 0;
                ctrlFF.height = 0;
                /*
                 * Before accessing the plug-in's script interface it needs to be
                 * added to the page. If the 'setDevice' call fails, the plug-in
                 * is assumed to either not be installed or not working in this
                 * browser, in which case it is removed in the catch.
                 */
                document.body.appendChild(ctrlFF, document.body);
                 if (ctrlFF.setDevice(0) != null) {
                     /*
                      * As with the code for IE, any non-null value is a
                      * success.
                      */
                    return ctrlFF;
                }
    Chrome doesn't seem to support the .setDevice function, as when running the chrome developer tools inspect element tool, I can see it throw an exception at that line, and prompts the user to update java, because it thinks it is out of date.

    Has anyone run into this issue with chrome and know of a possible fix?

    Thanks a lot for your time,

    Legomaniac

  • #2
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi! Try the latest version of the plug-in from Google Code (I'm the author and I'm trying to work out why Chrome has problems).

    Carl


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •