1 Reply Latest reply on Nov 2, 2011 6:59 AM by Robert Galvin

    Are RhoElements Meta Tags Needed?  Or can we do it all in Javascript?

      The RhoElements examples show META tags along with Javascript.

       

      The Scanner object appears to have everything needed to operate the scanner and could conceivably operate without any META tags.

       

      Am I correct or are one or more META tags needed?  And it is the same for other Motorola devices such as MagStripe, RFID, et al.?

        • Re: Are RhoElements Meta Tags Needed?  Or can we do it all in Javascript?
          Robert Galvin

          Carl

           

           

           

          One could chose to use Meta Tags alone, Javascript objects alone or a combination of both. You will be able to get to the properties event handling the same way in either method. I will be doing a blog post on this shortly but here are some things you should know about the two methods:

           

           

           

          Meta Tags

           

          ·         Meta tags are processed at page load – so it is a “one shot deal”

           

          ·         Good for anything that you want to have globally available and “on” for your entire page. i.e. gesturing is probably something that would be “always on”.

           

          ·         Will not cause failures when  testing code in non RhoElements browsers (other browsers just ignore the tags)

           

          ·         Not good if you want to be able to enable/disable features within the same page. Ex: Scanner and Imager cannot be enabled at the same time on some devices, so in that case you app would probably want to use Javascript to turn on the scanner when a certain field has the focus, etc.

           

          ·         Not good if you want to access the RhoElement objects from code inside your page

           

           

           

          Javascript

           

          ·         Objects can be referenced any time during code execution

           

          ·         Good when you want to programmatically access and control (ie. Do something based on user interaction)

           

          ·         Easier way to create “libraries” that can be shared across applications

           

          ·         More “object oriented” then meta tags and maybe easier for typical HTML programmers

           

          ·         Will cause javascript errors when running on non RhoElements browsers if code does not handle properly (see building your first app blog post on this one)