Mark,
        If what you want is to let the user know that
processing has completed, what you need to do is
quite simple, old school CGI processing:  You change
the rendered output to reflect the results of processing.

        After finishing processing, change a variable, say,
"resultString", and display it in the rendered
output.  You can have something like:

// Notice the call to GetResultString() to inject
server output.
 AnswerString(Flags,
  '',           { Default Status '200 OK'         }
  '',           { Default Content-Type: text/html }
  '',           { Default header                  }
  '<HTML>' +
   '<HEAD>' +
    '<TITLE>' + TitleString + '</TITLE>' +
   '</HEAD>' +
   '<BODY style="background:' + serverHTMLBGColor +
'">' +
   GetResultString(resultString) +
   '<form action="AC" method="post">' +      
//accept command action
    '<p>Tag:' + tagName + ' ' + cBackButton + '</p>' +
    '<p>High Limit: ' + highEU + '</p>' +
    '<p>Low Limit: ' + lowEU + '</p>' +
    '<input name=Tagname type=hidden value="' +
tagname + '"/>' +
    '<input name=ItemID type=hidden value="' +
itemIDString + '"/>' +
    '<input name=UserValue type=text value="' +
currentValue + '"/><br/>' +
    '<input name=AcceptBtn type=submit
value="Accept"/>' +
   '</form>' +
  '</HTML>');

// -------

Function GetResultString(str: String): String
Begin
        If (str <> '') Then
                Result := 'Server Responded: '+ str
        Else
                Result := '';
        End If
End;

// -- END

When the page is first rendered, the
GetResultString() function will return an empty
string because the resultString hasn't been set.  And
when the data is posted and processed, it will
display the new string.

This is pretty much how more complex and
sophisticated frameworks, like ASP.NET, Java-Struts,
and PHP handle dynamically generated pages.

What Francois was offering was a more "modern" and
popular approach, usually called AJAX, where your web
page sends requests to the server on a separate
channel, using JavaScript, then parses the output,
and dynamically changes the document displayed.  It
does the same thing without "refreshing" the entire
document.  However, as you stated, this may not work
in exactly the same way on every browser, and depends
too much on client-side processing, which is prone to
errors and abuse.

        -dZ.

zayin wrote:
> Hi,
> 
> This all has to be done in HTML only.
> 
> This is my first HTML programming task so, I do not
know how to "make the
> command from an invisible frame or layer".
> 
> This is the page.
> 
>  AnswerString(Flags,
>   '',           { Default Status '200 OK'         }
>   '',           { Default Content-Type: text/html }
>   '',           { Default header                  }
>   '<HTML>' +
>    '<HEAD>' +
>     '<TITLE>' + TitleString + '</TITLE>' +
>    '</HEAD>' +
>    '<BODY style="background:' + serverHTMLBGColor +
'">' +
>    '<form action="AC" method="post">' +      
//accept command action
>     '<p>Tag:' + tagName + ' ' + cBackButton + '</p>' +
>     '<p>High Limit: ' + highEU + '</p>' +
>     '<p>Low Limit: ' + lowEU + '</p>' +
>     '<input name=Tagname type=hidden value="' +
tagname + '"/>' +
>     '<input name=ItemID type=hidden value="' +
itemIDString + '"/>' +
>     '<input name=UserValue type=text value="' +
currentValue + '"/><br/>' +
>     '<input name=AcceptBtn type=submit
value="Accept"/>' +
>    '</form>' +
>   '</HTML>');
> 
> Can you advise?



-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to