External Function Call

Forum to discuss the Web client version of Servoy.

External Function Call

Postby rafig » Tue Mar 06, 2012 4:56 pm

Hi,
I'm quite new to using Web Client, but have created a mobile (iOS) UI for my Servoy solution to integrate with a bar code scanner module that attaches to a iPod Touch and allows as laser scanning of bar code data directly into Servoy fields on web client forms.
I have been using an app called iCody for this, but was also looking at another app called 'SwipeTrack' (ST)
ST has a web API, that I assume (I am no expert on web page design etc.) causes a JavaScript function event to happen when someone presses the hardware scan button on the external device, allowing more automation of capturing the bar code (even hiding the field it goes into)
Here is what they had on their web page
Code: Select all
function onScanAppBarCodeData(bar,t)
      {
         //'bar' is the retrieved Barcode
         document.getElementById('barcode').value = bar;
         
         //'t' is the type of barcode (number code)
         document.getElementById('type').value = t;
         
         return true;
      }

Can I in Servoy add this function to my form methods, replacing the 'document.getElement...' bits by either 'element...=' or 'myfield=' and that the function will be fired by the iOS app??
Thanks
Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 708
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: External Function Call

Postby ngervasi » Wed Mar 07, 2012 12:19 am

No, but using the Webclient Utils plugin you can trigger a servoy method and get the scanned value. Have a look at the docs on ServoyForge and say thanks to Patrick Talbot for this great plugin!
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 12 guests