Alpha Video Training
Page 2 of 2 FirstFirst 12
Results 31 to 49 of 49

Thread: Capture Signature on iPad?

  1. #31
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Capture Signature on iPad?

    aarrrg.. I placed the components inside an a5w page and the signature seems to work now as intended but all of my window variables are broken! Variables were working fine from grid to grid or grid to dialog and now do not from grid to a5w page.

  2. #32
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Capture Signature on iPad?

    Quote Originally Posted by omagarc View Post
    Roadblock: Once my user completes and signs, I return to a list of other questionnaires. The user will select the next questionnaire but cannot sign as the button does not appear to work. If I refresh the browser, it will work again. So my problem is that I cannot use the javascript more than once as I guess the elements are consumed by the first instance. I've tried JQuery.("#signature").empty() to see if I could unload but no love. So my question is how does one unload the javascript without refreshing the browser. Kind of like closing a connection and reopening. I need to acquire the signature, save it close the dialog/grid and go to the next questionnaire and acquire the signature again. I'm reusing the same code but it only likes it once...
    This is one of those....live and learn. My confusion came from what I'm used to in terms of global variables from the desktop side of things. I scrapped the variables alltogether and simply added the data from the table i needed in the grid query. What I learned is that even though it appears that a button in a grid that opens another grid or dialog that is embeded in an a5w page ....it is not part of the same DOM. Each a5w page is independent. So my use of window['myvar'] did not fly between the a5w pages. I'm sure there is a way to do this but opted to just get the data from sql instead (which is easier). My mechanical side had taken over my logical side thus the confusion. I can see better now!

  3. #33
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Capture Signature on iPad?

    Omar,

    Just a big thank you for helping me to get the signature to work on my PC. Next stop, Ipad!!
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  4. #34
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Capture Signature on iPad?

    Hi Omar,

    I am stuck on the last part of getting the data in the table to display as an image in the report. You mentioned in your video saving the image from a PNG file. How did you do that?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  5. #35
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Capture Signature on iPad?

    Quote Originally Posted by Keith Hubert View Post
    Hi Omar,

    I am stuck on the last part of getting the data in the table to display as an image in the report. You mentioned in your video saving the image from a PNG file. How did you do that?
    I emailed you an additional video.. As we had discussed, I commit the data to disk before running the report. A calculated field on the report finds the file created to display.

    You could also convert the data to jpeg and store that in a long blob instead of storing the encoded signature....

  6. #36
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Capture Signature on iPad?

    Hi Omar,

    Thanks for the video. As it is only 45 seconds I have watched it many times over, whilst I understand the concept of what you have done, I just want to use the data as required without having to build and save another file.

    I noticed that the code you displayed was part of a script that is over 300 lines, is it possible to post the code here that just deals with the decode?

    What would be a good idea is if that could be simplyfied into a function, what do you think?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  7. #37
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Capture Signature on iPad?

    Hi Omar,

    Thanks for the video. As it is only 45 seconds I have watched it many times over, whilst I understand the concept of what you have done, I just want to use the data as required without having to build and save another file.

    I noticed that the code you displayed was part of a script that is over 300 lines, is it possible to post the code here that just deals with the decode?

    Also, could you please advise why you felt it better to convert from png to bmp and then to jpg. All part of my learning curve.

    What would be a good idea is if that could be simplyfied into a function, what do you think?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  8. #38
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Capture Signature on iPad?

    Code:
    function mysig as c (e as p)
    
     	dim cn as sql::Connection
     	dim args as sql::arguments
    	dim cs as c = e.tmpl.cs.connectionstring
    	dim v_signature as A
    
    ' Open connection and insert data
    	cn.open(cs)
    
    ' Fetch Signature
    	table = "yourtablename"
    	result_expression = "signature"
    
    ' Here you have to define your record identifier
    
    	filter = "id = "e._currentRowDataNew.yourkey
    
    	v_signature = sql_lookup(cn,table,filter,result_expression)
    
    ' decode signature
    	dim bb as b
    	bb = base64decode(v_signature)
    	
    	args.add("mysig",bb)
    	args.add("myid",e._currentRowDataNew.yourkey)
    
    	SqlUpdateStatement = <<%txt%
     		Update yourtable SET mysignaturecolumn = :mysig WHERE id = :myid
     		%txt%
     	
    	cn.execute(sqlUpdateStatement,args)
    
    end function
    My suggestion is that you create an additional column to update with decoded image. You can then directly reference this column in your report.

  9. #39
    Member
    Real Name
    Fred Chan
    Join Date
    May 2012
    Posts
    72

    Default Re: Capture Signature on iPad?

    Siganture.rar

    go error when try the sample

    Thanks

  10. #40
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Capture Signature on iPad?

    Quote Originally Posted by fred@cocohost.com View Post
    Siganture.rar

    go error when try the sample

    Thanks
    No error here; I was able to sign and see the string as shown..
    Capture.JPG

  11. #41
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Capture Signature on iPad?

    Fred,

    What is the urchin file? Is this something I need?

    I also have error when trying to use Working Preview, see attached.
    Attached Images Attached Images
    Last edited by Keith Hubert; 03-09-2013 at 04:05 AM.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  12. #42
    Member
    Real Name
    Fred Chan
    Join Date
    May 2012
    Posts
    72

    Default Re: Capture Signature on iPad?

    May be me Version is different from him
    my version is V11 4041

    Thanks

    Quote Originally Posted by Keith Hubert View Post
    Fred,

    What is the urchin file? Is this something I need?

    I also have error when trying to use Working Preview.

  13. #43
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Capture Signature on iPad?

    Quote Originally Posted by fred@cocohost.com View Post
    May be me Version is different from him
    my version is V11 4041

    Thanks
    Version 11, Build 3044
    System Addins: Build 4041 C Compiler version 1600

    Windows 7 Ultimate x64
    IE 9
    Firefox 19

  14. #44
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Capture Signature on iPad?

    Quote Originally Posted by Keith Hubert View Post
    Fred,

    What is the urchin file? Is this something I need?

    I also have error when trying to use Working Preview, see attached.
    Make sure you are on Version 9 + of IE

  15. #45
    Member
    Real Name
    strini
    Join Date
    Nov 2008
    Posts
    7

    Default Re: Capture Signature on iPad?

    Hi Fred Chan...

    Please help I am trying to get my customer to acknowledge receipt of goods by signing on a ipad.
    Everything is working but how do i go about creating the grid and a5w pages.
    Any help would be appreciated. I am using Alpha Five v10.5
    kind regards
    Strini ( strini.ammasai@gmail.com)

  16. #46
    Member
    Real Name
    Mike Margolius
    Join Date
    Jan 2015
    Location
    Johannesburg, South Africa
    Posts
    2

    Default Re: Capture Signature on iPad?

    Thanks for this example, it so simple to use compared to other examples I have seen. I have added to it my code, but I need assistance to save the image to a file. I have experience with C# and SQL, and very little with html.

    Thanks

  17. #47
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Capture Signature on iPad?

    The code is based upon existing data in the sql backend including binary data.

    Not everyone will or will want to store the binary data in a table.

    So say that you have acquired the signature and want to create a file you will simply decode the signature contents and the create a file from blob.


    Code:
     	dim cn as sql::Connection
     	dim args as sql::arguments
    	dim cs as c = e.tmpl.cs.connectionstring
    	dim v_signature as A
                  dim v_filename as c
    
    ' Open connection and insert data
    	cn.open(cs)
    
    ' Fetch Signature
    	table = "yourtablename"
    	result_expression = "signature"
    
    ' Here you have to define your record identifier
    
    	filter = "id = "e._currentRowDataNew.yourkey
    
    	v_signature = sql_lookup(cn,table,filter,result_expression)
    
    ' decode signature
    	dim bb as b
    	bb = base64decode(v_signature)
    
    ' save to file
                  file.from_blob(v_filename,bb)
    
    Once the file is saved and you know the name, you may reference it in any html code by either static name or reading a table column.

  18. #48
    Member
    Real Name
    Mike Margolius
    Join Date
    Jan 2015
    Location
    Johannesburg, South Africa
    Posts
    2

    Default Re: Capture Signature on iPad?

    Hi Omar, Thanks for sending me the VB Scrip code. Do you have the code for c# as I am unable to interpret it.

    regards
    Mike

  19. #49
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Capture Signature on iPad?

    The code is Alpha Software's Xbasic IDE that will run at the Web Application Server (WAS) that delivers the html,javacsript,css, etc to the web browser for users to view, process etc. The code presented assumes a sql backend where the signature data is stored in a column and subsequently saves a file at the "WAS" for inclusion into a web-page, grid, etc.

Similar Threads

  1. signature capture on Alpha
    By kunjulin in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 10-12-2012, 10:34 PM
  2. Topaz Signature Capture Pads
    By Dean W. Charron in forum Alpha Five Version 10 - Desktop Applications
    Replies: 2
    Last Post: 03-16-2011, 01:28 PM
  3. Signature Capture
    By MickeyP in forum Alpha Five Version 8
    Replies: 2
    Last Post: 08-21-2007, 11:44 AM
  4. Signature capture
    By sicomputerguy in forum Alpha Five Version 6
    Replies: 2
    Last Post: 09-09-2005, 06:04 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •