Child pages
  • Using External JavaScript

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With Servoy Mobile you can easily integrate 3rd party javascript plugins/libraries
in your app. Here are the steps to achieve this :

  • in Servoy Developer add all the js & css files of the 3rd party plugin as Media;
    all the js & css files from here will be added to the mobile page;
  • if the plugin requires static html content already on the page, you can do this by
    placing a bean on the form, that is actually an empty div, and setting its "text" property
    (innerHTML) with the static (html) content;
  • another usefull function that can be used when integrating 3rd party plugins is that from
    the mobile plugin : plugins.mobile.getMarkupId(), using this you can retrieves document markup id for a Servoy form elements and customize them; which then usable in calls like document.getElementById
  • 3rd party plugins initialization code should be placed inside the form onLoad callback,that
    is called after the page is ready for display, but before showing it;.
    Ex. Example:  
    Code Block
    function onLoad(event)
    {
     var options = {
     drawOnly : true
     };
     var api = $('.sigPad').signaturePad(options);
     api.regenerate(foundset.orders_to_deliveries.signature);
    }
    

Here you can find a We made an sample, its like a fedex Fedex/UPS delivery app, that uses
a jquery based signature library to display a signature field: (checkout with SVN)
https://subversion.servoy.com/examples/MobileDeliverySample/trunkImage Removed