ts-7000
[Top] [All Lists]

Re: [ts-7000] html web page GUI changes to blank after button push....

To:
Subject: Re: [ts-7000] html web page GUI changes to blank after button push....
From:
Date: Mon, 8 Sep 2008 07:40:41 -0500

I recently went through this also...

This very simple HTML/_javascript_ example uses a timer rather than an actual command button, but I think you can make that jump.

In the example the timer merely calls the cgi and prints the response in the textbox (in your case it would print a blank line).

You would -- as mentioned in a previous e-mail -- use a command click action rather than the timer event.  Replace 'fastcgi.fcgi?'+Date() with the name of your cgi program and arguments (in this example my only arguments are the date).

Hope this helps... I do think your question has many things to do with embedded systems and TS equipment in general... a HMI is a very useful thing for an embedded device.


Content-type: text/html

<HTML><HEAD>
<TITLE>This is an interface to a fcgi program</TITLE>
<META HTTP-EQUIV="expires" CONTENT="0"
</HEAD>

<script language="_javascript_">
<!--
var httpRequest = new XMLHttpRequest() ;
var c=0 ;function status()
{
   var x = document.getElementsByName("comments") ;
   x[0].value=httpRequest.status+': '+httpRequest.statusText ;
   InitializeTimer() ;
}
function InitializeTimer()
{
   test() ;
   var t=self.setTimeout( "InitializeTimer()", 250 ) ;
}
function test() {
        var x = document.getElementsByName("comments") ;
        httpRequest.open( 'POST', 'fastcgi.fcgi?'+Date(), false ) ;
        httpRequest.send(null) ;
        c=c+1 ;
        x[0].value=c+' '+httpRequest.responseText ;
}
//-->
</script>


<BODY >
<PRE>Argument   0: ./testA.cgi
</PRE><textarea name="comments" cols="40" rows="10">Enter your comments here...</textarea><br><input type="submit" value="Submit" />
</BODY>
</HTML>




This is a CGI (but more fundementally just an HTTP/HTML question) and has
nothing to do with:
1) embedded systems
2) the TS-7xxx series of ARM board
3) any TS equipment

wrote on 09/05/2008 11:44:10 PM:

> Hi,
>
> I've designed a html web page GUI, with buttons that invoke C
> executables to control GPIO on my ts-7260.  This works very nice.
> After the C executable is complete, the web page GUI changes to a
> blank page. The brouser's url is, for example, 192.168.0.50/cgi-
> bin/button.cgi?
> The html form method is GET, where I pass parameters from the GUI to
> the C executable via the environment variable QUERY_STRING. This again
> happens from the button push, and the form action="" The
> button.cgi has a standard header, as: printf("Context-type:
> text/plain\n\n"). It then does its GPIO operations, and returns 0;
> Button.cgi is not meant to send anything back to the GUI.
>
> Is there a way to keep the web page GUI from switching to blank after
> pushing the button?
> Any help is appreciated...if you need more info, let me know.
> Thanks,
> Steve
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
> <*> To visit your group on the web, go to:
>     http://groups.yahoo.com/group/ts-7000/
>
> <*> Your email settings:
>     Individual Email | Traditional
>
> <*> To change settings online go to:
>     http://groups.yahoo.com/group/ts-7000/join
>     (Yahoo! ID required)
>
> <*> To change settings via email:
>    
>    
>
> <*> To unsubscribe from this group, send an email to:
>    
>
> <*> Your use of Yahoo! Groups is subject to:
>     http://docs.yahoo.com/info/terms/
>
__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU