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 Tue May 22, 2012 1:52 am




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Problem in uploading files as JPG to webfolder after bul sca
PostPosted: Sun Apr 02, 2006 11:25 pm 
Offline

Joined: Tue Mar 14, 2006 10:23 pm
Posts: 4
Location: Dubai
I m trying with the following code, it show success but i think its not calling for other page "SaveToFile.Aspx" at all
function btnUpload_onclick()
{
var strActionPage;
var strHostIP;
var CurrentPathName = unescape(location.pathname); // get current PathName in plain ASCII

var CurrentPath = CurrentPathName.substring(0, CurrentPathName.lastIndexOf("/") + 1);

strActionPage = CurrentPath + "SaveToFile.aspx?AppId=<%=request("AppId")%>"; //the ActionPage's file path

strHostIP = "MF";

//the host's ip or name
frmScan.DynamicWebTwain1.HTTPPort = 80;

for (var l = 0; l < frmScan.DynamicWebTwain1.HowManyImagesInBuffer; l++)
{
alert(strHostIP + ' ' + strActionPage);

frmScan.DynamicWebTwain1.HTTPUploadThroughPost(strHostIP, 0, strActionPage, l + ".jpg"); }

if (frmScan.DynamicWebTwain1.ErrorCode != 0)
alert(frmScan.DynamicWebTwain1.ErrorString);
else //succeded
alert(frmScan.DynamicWebTwain1.HTTPPostResponseString);
}

_________________
IMPOSSIBLE SAYS I M POSSIBLE


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 03, 2006 10:38 pm 
Offline
User avatar

Joined: Tue Mar 08, 2005 12:23 am
Posts: 1075
Quote:
it show success but i think its not calling for other page "SaveToFile.Aspx" at all


It shows success because the last function DWT calls in your code is HowManyImagesInBuffer property and it succeeds.

Please place the code for error code into the FOR loop, as seen below:

Code:
for (var l = 0; l < frmScan.DynamicWebTwain1.HowManyImagesInBuffer; l++)
{
alert(strHostIP + ' ' + strActionPage);

frmScan.DynamicWebTwain1.HTTPUploadThroughPost(strHostIP, 0, strActionPage, l + ".jpg");

if (frmScan.DynamicWebTwain1.ErrorCode != 0)
alert(frmScan.DynamicWebTwain1.ErrorString);
else //succeded
alert(frmScan.DynamicWebTwain1.HTTPPostResponseString);
}


And please let us know the error string you get so that we could look into your problem more closely.

Thanks.

_________________
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 Tue May 22, 2012 1:52 am


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