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.

Testing for a blank signature

3 posts in General Discussion Last posting was on 2010-07-23 08:37:12.0Z
Shao Chan Posted on 2010-07-21 13:42:34.0Z
Reply-To: "Shao Chan" <nospam@nospam.com>
From: "Shao Chan" <nospam@nospam.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Testing for a blank signature
Lines: 25
Organization: Civica
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c46f94a@forums-1-dub>
Date: 21 Jul 2010 06:42:34 -0700
X-Trace: forums-1-dub 1279719754 10.22.241.152 (21 Jul 2010 06:42:34 -0700)
X-Original-Trace: 21 Jul 2010 06:42:34 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:1507
Article PK: 9461

Hi all,

M-Biz has the scribble widget.

When you create a widget, the value is blank, i.e.
node.value = ""
the above is true.

However, if you press the clear button within the signature scribble to
clear out the signature and press Done, a node.value gives:
AUAPAQEAAF0LAABdCwAAAAA=

This has a string length of 24.

Why?

Is this reliable across all versions of M-Biz?

How can I reliably test for blank?

Cheers,

Shao


Jeff Albion [Sybase iAnywhere] Posted on 2010-07-22 16:12:42.0Z
From: "Jeff Albion [Sybase iAnywhere]" <firstname.lastname@ianywhere.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6
MIME-Version: 1.0
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Testing for a blank signature
References: <4c46f94a@forums-1-dub>
In-Reply-To: <4c46f94a@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c486dfa$1@forums-1-dub>
Date: 22 Jul 2010 09:12:42 -0700
X-Trace: forums-1-dub 1279815162 10.22.241.152 (22 Jul 2010 09:12:42 -0700)
X-Original-Trace: 22 Jul 2010 09:12:42 -0700, vip152.sybase.com
Lines: 62
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:1508
Article PK: 9462

Hi Shao,

On 21/07/2010 9:42 AM, Shao Chan wrote:
> Hi all,
>
> M-Biz has the scribble widget.
>
> When you create a widget, the value is blank, i.e.
> node.value = ""
> the above is true.
>
> However, if you press the clear button within the signature scribble to
> clear out the signature and press Done, a node.value gives:
> AUAPAQEAAF0LAABdCwAAAAA=
>
> This has a string length of 24.
>
> Why?

This may just be a difference of "blank" versus "null" data. "Blank"
would imply that there is a valid signature field, it just hasn't been
filled yet. As opposed to page initialization, which may set the field
to be "null" and then only instantiates the value once someone clicks on
the field / clicks "clear".

The string given will be the data in Base64 format.

> Is this reliable across all versions of M-Biz?

I get the same value for a "blank" field. Since this is just a Base64
encoded version of the data, I would expect this value to be constant.

> How can I reliably test for blank?

To guarantee this, I would just insert the "blank" value in the HTML
code / JS code directly - it makes no difference in the output:

<input type="scribble" name="scribbletest" width="500" height="100"
id="scribbletest" alt="Signature Box" value="AUAPAQEAAF0LAABdCwAAAAA=" />

or

var boundingbox = document.getElementById("scribblebox");
var scribblebox = document.createElement("input");
scribblebox.setAttribute("type", "scribble");
scribblebox.setAttribute("name", "signbox");
scribblebox.setAttribute("width", "500");
scribblebox.setAttribute("height", "100");
scribblebox.setAttribute("alt", "Signature Box #1");
scribblebox.value = "AUAPAQEAAF0LAABdCwAAAAA=";

Regards,

--
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/


Shao Chan Posted on 2010-07-23 08:37:12.0Z
Reply-To: "Shao Chan" <nospam@nospam.com>
From: "Shao Chan" <nospam@nospam.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
References: <4c46f94a@forums-1-dub> <4c486dfa$1@forums-1-dub>
Subject: Re: Testing for a blank signature
Lines: 81
Organization: Civica
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c4954b8@forums-1-dub>
Date: 23 Jul 2010 01:37:12 -0700
X-Trace: forums-1-dub 1279874232 10.22.241.152 (23 Jul 2010 01:37:12 -0700)
X-Original-Trace: 23 Jul 2010 01:37:12 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:1509
Article PK: 9463

Hi Jeff,

Thanks for that. That makes sense.

I also realised that because the size is 24 and even if the engineer only
signs with a single tap of the stylus, the image is larger than this, I
could check for that also.

Thanks for the reply.

Cheers,

Shao

"Jeff Albion [Sybase iAnywhere]" <firstname.lastname@ianywhere.com> wrote in
message news:4c486dfa$1@forums-1-dub...
> Hi Shao,
>
> On 21/07/2010 9:42 AM, Shao Chan wrote:
>> Hi all,
>>
>> M-Biz has the scribble widget.
>>
>> When you create a widget, the value is blank, i.e.
>> node.value = ""
>> the above is true.
>>
>> However, if you press the clear button within the signature scribble to
>> clear out the signature and press Done, a node.value gives:
>> AUAPAQEAAF0LAABdCwAAAAA=
>>
>> This has a string length of 24.
>>
>> Why?
>
> This may just be a difference of "blank" versus "null" data. "Blank" would
> imply that there is a valid signature field, it just hasn't been filled
> yet. As opposed to page initialization, which may set the field to be
> "null" and then only instantiates the value once someone clicks on the
> field / clicks "clear".
>
> The string given will be the data in Base64 format.
>
>> Is this reliable across all versions of M-Biz?
>
> I get the same value for a "blank" field. Since this is just a Base64
> encoded version of the data, I would expect this value to be constant.
>
>> How can I reliably test for blank?
>
> To guarantee this, I would just insert the "blank" value in the HTML code
> / JS code directly - it makes no difference in the output:
>
> <input type="scribble" name="scribbletest" width="500" height="100"
> id="scribbletest" alt="Signature Box" value="AUAPAQEAAF0LAABdCwAAAAA=" />
>
> or
>
> var boundingbox = document.getElementById("scribblebox");
> var scribblebox = document.createElement("input");
> scribblebox.setAttribute("type", "scribble");
> scribblebox.setAttribute("name", "signbox");
> scribblebox.setAttribute("width", "500");
> scribblebox.setAttribute("height", "100");
> scribblebox.setAttribute("alt", "Signature Box #1");
> scribblebox.value = "AUAPAQEAAF0LAABdCwAAAAA=";
>
> Regards,
>
> --
> 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/