Notes; Communication With Web Browsers; Html - CAB A+ Series Programming Manual

Hide thumbs Also See for A+ Series:
Table of Contents

Advertisement

a-Series basic compiler
408

Notes:

- Some streams like „/dev/panel" are always Unicode-streams. Using 'b' or 'u' modifiers can have
strange effects!
- Writing to an interface (e.g. /dev/rs232) will fail if the printer cannot send the data. There's a time
out of 10 seconds.
- Opening an interface as file stops ESC interpretation on this device.
- abc has an additional command called FLUSH which enables you to clear the input buffer of
/dev-streams in read mode (e.g. FLUSH #1 when 1 ist /dev/rawip). FLUSH #0 clears standard input.
- abc has an additional command to erase files: ERASE „name".

Communication with Web Browsers:

cab printers have a web server which is usually used for administration, but can also be used to
access data like images or HTML pages from the card. So it is only logical to seek a way to transmit
data from the browser to the printer. This is normally done by CGI scripts using forms. We do it the
same way :-) You can however not define CGI scripts your own, but we provide a way to get form
data into your abc program:

HTML

You simply define a form in your HTML page which uses get_form.cgi as ACTION.
This form lets the user enter some data in a text field called „example". After clicking the „Send data"
button, the form content is sent from the browser to the web server and parsed there. Then the
extracted data is put into the input buffer which can be read by abc or directly by JScript. There
are two special field names available:
- nextpage this defines the name of the html page which is loaded after sending the form.
- jscript
A more complex example showing most of the possibilities of the CGI interface is the „cinema ticket"
program. This is available on request. In this case you can contact „support@cabgmbh.com"
cab Produkttechnik GmbH & Co KG
<form action="/get_form.cgi" method="post">
<input type="hidden" name="nextpage" value="thanks.htm">
<input type="text" name="example">
<input type="submit" value="Send data">
</form>
Default is index.htm.
Can be used to send a JScript command before the data. So you can e.g. send
a „M l lbl" command before the data of the form.
408
408

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mach 4PxXd4

Table of Contents