TWAIN ActiveX Control, Plug-in, Scanner SDK, Component, HTTP Control/SDK

Dynamsoft TWAIN Products

Support Community for TWAIN Control/Component/SDK for Scanning Solutions
* Login   * Register
* FAQ    * Search

It is currently Sun May 20, 2012 3:01 pm




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: how to bind a DynamicWebTwain event using jquery
PostPosted: Thu Feb 10, 2011 8:44 am 
Offline

Joined: Mon Jul 19, 2010 1:27 pm
Posts: 9
i'm trying to bind a DynamicWebTwain event using jquery and i get an error saying "OnPostTransfer" is undefined.

my code is:

$('DynamicWebTwain').bind(OnPostTransfer, somefunction() );


Can you help me?


Top
 Profile  
 
 Post subject: Re: how to bind a DynamicWebTwain event using jquery
PostPosted: Fri Feb 11, 2011 3:12 am 
Offline
User avatar

Joined: Tue Mar 08, 2005 12:23 am
Posts: 1075
Hi lcgray,

We are looking into this. Meanwhile, please try the below code and see how it works.

Code:
var addListener = function() {
   if ( window.addEventListener ) {
      return function(el, type, fn) {
         el.addEventListener(type, fn, false);
      };
   } else if ( window.attachEvent ) {
      return function(el, type, fn) {
         var f = function() {
            fn.call(el, window.event);
         };
         el.attachEvent(type, f);
      };
   } else {
      return function(el, type, fn) {
         element[type] = fn;
      }
   }
}();
addListener(document.getElementById("DynamicWebTwain"), 'OnPostTransfer', DynamicWebTwain_OnPostTransfer);

Best.

_________________
Catherine Sea
TWAIN Support Team
TWAIN ActiveX/Plug-in for Web Applications, Scanner COM Control
TWAIN .NET Component/SDK for Desktop Applications

Follow me @Twitter, Facebook
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

It is currently Sun May 20, 2012 3:01 pm


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Copyright © 2010 Dynamsoft Corporation. All Rights Reserved. | Knowledge Base | Source Control Blog