Google Answers Logo
View Question
 
Q: E-Comm / SQL Order Fulfillment / URL Printing??? ( No Answer,   2 Comments )
Question  
Subject: E-Comm / SQL Order Fulfillment / URL Printing???
Category: Computers > Programming
Asked by: nick_name-ga
List Price: $15.00
Posted: 13 Apr 2004 12:08 PDT
Expires: 10 May 2004 11:52 PDT
Question ID: 329615
We have an .ASP e-commerce application (internally developed) that is
running in a HOSTED environment (IIS on Win2k and DB on SQL 7).
 We currently have a ?status? page for all open orders.  After the
user manually prints the order it is flagged as printed and no longer
shows on the status page.  Rather than having to manually check for
open orders, I would like to have orders automatically printed
locally.  I?m not sure how to best go about this.

Ideally a trigger on the order table would kick off *something* that
would send the order to a local printer.  Our current ?Pull Sheets?
need to be rendered through a web browser for output, I code recode to
plain text if it would make a difference.  I have a local SQL2K server
(replication?), MS Access, and can program asp if it makes a
difference.  Our hosted environment also supports ASPX if that would
help.  I would like suggestions on how to best accomplish the above
goal.  An acceptable answer will point me in the right direction given
the tools and skills listed above.  I don?t think this should be too
tough, I just can?t see it.  I really just want to be able to send a
browser rendered URL  to a local printer in landscape mode whenever an
order is placed?
Answer  
There is no answer at this time.

Comments  
Subject: Re: E-Comm / SQL Order Fulfillment / URL Printing???
From: wellcum-ga on 13 Apr 2004 12:53 PDT
 
Add the following code to your Status page should do the trick. 
There's no way to start a client application from server side, so you
have to refresh the page periodically.


<html><head><script language=javascript>
function ieExecWB( intOLEcmd, intOLEparam ){
	var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0
CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
	document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
	if ( ( ! intOLEparam ) || ( intOLEparam < -1 )  || ( intOLEparam > 1 ) )
		intOLEparam = 1;
	WebBrowser1.ExecWB( intOLEcmd, intOLEparam );
	WebBrowser1.outerHTML = "";
}
</script></head><body>
<%Response.Write("The Time is:" + DateTime.Now())%>
<script language=javascript>ieExecWB(6, -1);</script>
</body></html>
Subject: Re: E-Comm / SQL Order Fulfillment / URL Printing???
From: nick_name-ga on 15 Apr 2004 16:12 PDT
 
wellcum-ga,

Thanks for the tip and the code!  I'm still doing some testing, but it
seems to be working perfectly.  I'm not familiar with javascript and
couldn't have done it without your code.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy