Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #20166

Re: Adding widget to web page to display data from serial port.

From stephenXXX@mpeforth.com (Stephen Pelc)
Newsgroups comp.lang.forth
Subject Re: Adding widget to web page to display data from serial port.
Message-ID <5131e444.1498603527@192.168.0.50> (permalink)
References <adb5552e-39bf-48fd-a3ef-b5b8992178e8@googlegroups.com>
Date 2013-03-02 11:45 +0000

Show all headers | View raw


On Fri, 1 Mar 2013 15:33:03 -0800 (PST), "Clyde W. Phillips Jr."
<cwpjr02@gmail.com> wrote:

>The serial part needs a strategy to transfer the incoming data to 
>something that web code can access. AFAIK web pages cannot directly
>access HW like serial ports.

On the desktop the VFX Forth Professional editions, and the embedded
Forth 7 cross compilers, include the PowerNet web servers. These use
ForthScript (yes, just Forth) for server-side scripting. Here's a
simple example:

<html>
<head><title>Test form response by ASP</title></head>
<body>
<h3>Thank you</h3>
<p>The form response has been processed using ASP and ForthScript
by the PowerNet Web Server. You can see the code in the file
<i>TestPages\thanks.asp</i>, which is the file that generated
this page.
</p>
<% language=forthscript %>
<br><h3>Your responses were:</h3>
<p>Name : <% s" sname" .qstring %> </p>
<p>Email: <% s" smail" .qstring %> </p>
<p>State: <% s" state" .qstring %> </p>
<p>You pressed the <% s" send" .qstring space %> button</p>
</body>
</html>

The code between <% and %> is just Forth source code which is
executed on the server when the page is served.
  s" sname" .qstring
displays the value of of a connection variable called SNAME.

Stephen

-- 
Stephen Pelc, stephenXXX@mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Adding widget to web page to display data from serial port. "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2013-03-01 15:33 -0800
  Re: Adding widget to web page to display data from serial port. stephenXXX@mpeforth.com (Stephen Pelc) - 2013-03-02 11:45 +0000
    Re: Adding widget to web page to display data from serial port. "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2013-03-02 19:21 -0800
      Re: Adding widget to web page to display data from serial port. "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2013-03-02 19:25 -0800
      Re: Adding widget to web page to display data from serial port. stephenXXX@mpeforth.com (Stephen Pelc) - 2013-03-03 21:42 +0000
        Re: Adding widget to web page to display data from serial port. "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2013-03-03 17:01 -0800
          Re: Adding widget to web page to display data from serial port. stephenXXX@mpeforth.com (Stephen Pelc) - 2013-03-04 10:25 +0000
            Re: Adding widget to web page to display data from serial port. "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2013-03-04 20:19 -0800
              Re: Adding widget to web page to display data from serial port. Mark Wills <markrobertwills@yahoo.co.uk> - 2013-03-04 23:46 -0800
              Re: Adding widget to web page to display data from serial port. stephenXXX@mpeforth.com (Stephen Pelc) - 2013-03-05 10:37 +0000
                Re: Adding widget to web page to display data from serial port. Mark Wills <markrobertwills@yahoo.co.uk> - 2013-03-05 03:08 -0800
                Re: Adding widget to web page to display data from serial port. stephenXXX@mpeforth.com (Stephen Pelc) - 2013-03-06 11:39 +0000
  Re: Adding widget to web page to display data from serial port. "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2013-03-05 11:04 -0800
  Re: Adding widget to web page to display data from serial port. "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2013-03-05 11:07 -0800
    Re: Adding widget to web page to display data from serial port. Mark Wills <markrobertwills@yahoo.co.uk> - 2013-03-05 12:00 -0800
  Re: Adding widget to web page to display data from serial port. "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2013-03-08 20:10 -0800

csiph-web