Click to See Complete Forum and Search --> : Nesting Javascript inside CGI Html


scottcap
09-18-2003, 09:54 PM
Is it possible to nest a Javascript into a CGI program. The CGI program I have made for a chat room creates an "on the fly HTML page". On this HTML page is a text input box for chat messages to be entered. I want to use a JS onFocus to return the text prompt back to the input box after the message text is submitted and the text has been cleared from the input box. I have tried nesting it within the HTML but nothing happens to return the text prompt back to the input box after the text is submitted,

Wait anyones reply... thanks!

Scott

Jona
09-20-2003, 12:49 AM
You should be able to include a <script type="text/javascript"></script> in your HTML code that is sent to the browser... Interaction isn't possible, but onSubmit of a form, you can send values to the server, and fill the text input with the returned value.

[J]ona