Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

[MB 6.7] Update page after using barcode scanner

3 posts in General Discussion Last posting was on 2009-05-15 12:00:19.0Z
Jérôme Kehr Posted on 2009-05-14 08:29:35.0Z
Reply-To: "Jérôme Kehr" <jerome.kehr@praxedo.com>
From: "Jérôme Kehr" <jerome.kehr@praxedo.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: [MB 6.7] Update page after using barcode scanner
Lines: 16
Organization: Praxedo
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a0bd66f$1@forums-1-dub>
Date: 14 May 2009 01:29:35 -0700
X-Trace: forums-1-dub 1242289775 10.22.241.152 (14 May 2009 01:29:35 -0700)
X-Original-Trace: 14 May 2009 01:29:35 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:1370
Article PK: 17964

Hi

I use M-Business 6.7 on a mobile Psion Ikon which has a codebar scanner.
After reading a bar code, the 'onscan' event calls a function that displays
a new page, or alter the content of the current page. All the code of the
function is executed but the problem is that the content does not update.
The page does not change except when touching the screen. So, I open a popup
with an 'alert()' to force the user to touch the screen but this is not very
practical and ergonomic.

Has anyone already encountered this problem and managed to solve it?

Thanks,
Jérôme


Jeff Albion [Sybase iAnywhere] Posted on 2009-05-14 15:56:29.0Z
From: "Jeff Albion [Sybase iAnywhere]" <firstname.lastname@ianywhere.com>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: [MB 6.7] Update page after using barcode scanner
References: <4a0bd66f$1@forums-1-dub>
In-Reply-To: <4a0bd66f$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a0c3f2d$1@forums-1-dub>
Date: 14 May 2009 08:56:29 -0700
X-Trace: forums-1-dub 1242316589 10.22.241.152 (14 May 2009 08:56:29 -0700)
X-Original-Trace: 14 May 2009 08:56:29 -0700, vip152.sybase.com
Lines: 59
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:1375
Article PK: 9398

Jérôme,

It sounds like you may be seeing this issue:
http://search.sybase.com/kbx/solvedcases?id_number=11354087

---

I think we'll need some code details in order to better help you with
this, but there are some things that should be noted in general that you
might be running into:

1. Manipulation of the DOM should be reflected on the webpage without
requiring a second event firing, so what kind of DOM manipulation are
you doing? Also, note that the DOM won't be updated until the event that
triggered the update is finished.

2. Windows CE has a "hold-tap" feature that allows simulated
right-clicking. The unfortunate part about this is that it affects the
timing of the Javascript event handling in the M-Bus client (i.e. the
"onMouseDown" and "onMouseUp" events are delayed by 500 milliseconds).
If you're finding that the hold-tap feature is preventing the correct
execution of events, you may have to disable it with the following code:

<body
onLoad="avantgo.preferences.setBoolValueForKey('DisableRightClickPopup',
true);">

3. Javascript is a "single-threaded" environment, so depending on what
you're doing concurrently, other actions may be blocked. You can
simulate "threaded" events by using the SetTimeout() method:
http://www.w3schools.com/htmldom/met_win_settimeout.asp

---

If the above tips don't help, could you perhaps provide a short code
sample to demonstrate the problem? Maybe we can recommend a workaround.

Cheers,

Jérôme Kehr wrote:
> I use M-Business 6.7 on a mobile Psion Ikon which has a codebar scanner.
> After reading a bar code, the 'onscan' event calls a function that displays
> a new page, or alter the content of the current page. All the code of the
> function is executed but the problem is that the content does not update.
> The page does not change except when touching the screen. So, I open a popup
> with an 'alert()' to force the user to touch the screen but this is not very
> practical and ergonomic.
>
> Has anyone already encountered this problem and managed to solve it?

--
Jeff Albion, Sybase iAnywhere

iAnywhere Developer Community :
http://www.sybase.com/developer/library/sql-anywhere-techcorner
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
SQL Anywhere Patches and EBFs :
http://downloads.sybase.com/swd/summary.do?baseprod=144&client=ianywhere&timeframe=0
Report a Bug/Open a Case : http://case-express.sybase.com/cx/


Jérôme Kehr Posted on 2009-05-15 12:00:19.0Z
Reply-To: "Jérôme Kehr" <jerome.kehr@praxedo.com>
From: "Jérôme Kehr" <jerome.kehr@praxedo.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
References: <4a0bd66f$1@forums-1-dub> <4a0c3f2d$1@forums-1-dub>
Subject: Re: [MB 6.7] Update page after using barcode scanner
Lines: 100
Organization: Praxedo
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a0d5953@forums-1-dub>
Date: 15 May 2009 05:00:19 -0700
X-Trace: forums-1-dub 1242388819 10.22.241.152 (15 May 2009 05:00:19 -0700)
X-Original-Trace: 15 May 2009 05:00:19 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:1381
Article PK: 9403

Thanks to helping me.

avantgo.preferences.setBoolValueForKey('DisableRightClickPopup', true) does
not work.

here a sample of code :

//Load Pod
var podScan = CreateObject("pod.scan");

// Get scanned data
function getScannedData() {
return pxoPodScan.getScanData();
}

function showObjectInfoScanned() {
var scannedData = getScannedData();

// Access du db
var obj = getObjectById(scannedData);
session.setObject(obj);

avantgo.disconnect();
window.location = "objectInfos.jsp";
}

And in HTML page 'scan.jsp'
<body onscan="showObjectInfoScanned()">

At first scanning, the page 'objectInfos.jsp' loads fine. But, it's when I
returned to the page 'scan.jsp' and I scan again that it no longer works
(the code runs but the page does not change and I have to click on the
screen to update it).


"Jeff Albion [Sybase iAnywhere]" <firstname.lastname@ianywhere.com> a écrit
dans le message de news: 4a0c3f2d$1@forums-1-dub...

> Jérôme,
>
> It sounds like you may be seeing this issue:
> http://search.sybase.com/kbx/solvedcases?id_number=11354087
>
> ---
>
> I think we'll need some code details in order to better help you with
> this, but there are some things that should be noted in general that you
> might be running into:
>
> 1. Manipulation of the DOM should be reflected on the webpage without
> requiring a second event firing, so what kind of DOM manipulation are you
> doing? Also, note that the DOM won't be updated until the event that
> triggered the update is finished.
>
> 2. Windows CE has a "hold-tap" feature that allows simulated
> right-clicking. The unfortunate part about this is that it affects the
> timing of the Javascript event handling in the M-Bus client (i.e. the
> "onMouseDown" and "onMouseUp" events are delayed by 500 milliseconds). If
> you're finding that the hold-tap feature is preventing the correct
> execution of events, you may have to disable it with the following code:
>
> <body
> onLoad="avantgo.preferences.setBoolValueForKey('DisableRightClickPopup',
> true);">
>
> 3. Javascript is a "single-threaded" environment, so depending on what
> you're doing concurrently, other actions may be blocked. You can simulate
> "threaded" events by using the SetTimeout() method:
> http://www.w3schools.com/htmldom/met_win_settimeout.asp
>
> ---
>
> If the above tips don't help, could you perhaps provide a short code
> sample to demonstrate the problem? Maybe we can recommend a workaround.
>
> Cheers,
>
> Jérôme Kehr wrote:
>> I use M-Business 6.7 on a mobile Psion Ikon which has a codebar scanner.
>> After reading a bar code, the 'onscan' event calls a function that
>> displays a new page, or alter the content of the current page. All the
>> code of the function is executed but the problem is that the content does
>> not update. The page does not change except when touching the screen. So,
>> I open a popup with an 'alert()' to force the user to touch the screen
>> but this is not very practical and ergonomic.
>>
>> Has anyone already encountered this problem and managed to solve it?
>
> --
> Jeff Albion, Sybase iAnywhere
>
> iAnywhere Developer Community :
> http://www.sybase.com/developer/library/sql-anywhere-techcorner
> iAnywhere Documentation :
> http://www.ianywhere.com/developer/product_manuals
> SQL Anywhere Patches and EBFs :
> http://downloads.sybase.com/swd/summary.do?baseprod=144&client=ianywhere&timeframe=0
> Report a Bug/Open a Case : http://case-express.sybase.com/cx/
>