
Solid, safe website tools.
Whatever your need, Will Bontrager builds powerful software solutions.
If you don't find the answer to your question in these archives, ask your CGI question at the Current Master Series CGI Forum.
Does this page provide information you can use?
How can it be improved?
Your comment is anonymous.
When done typing, click anywhere outside the box. [more info]
| Author | Message |
|---|---|
| 12Nov04 gwen-engineer |
Subject: calling cgi functions from onclick or javascript Hi, I'm a novice. I'm working on an "embedded webserver". Everything's got to be very simple. I have a form with the action being a cgi function. But I'd also like to have a button on the page that calls another cgi function. I don't want it to act like a submit button. I don't want to have to redraw the page or redirect. Thanks for you help, Gwen |
| 12Nov04 Will [Email] ![]() |
In response to: calling cgi functions from onclick or javascript To avoid redraw, you may need to go with JavaScript instead of CGI. CGI, by definition, receives information from a browser and returns information to a browser. Information flows both ways. The information sent to a browser is the content of a new web page to be displayed. How CGI Works is a not-so-very technical overview of how CGI works. |
| 12Nov04 gwen-engineer |
In response to: calling cgi functions from onclick or javascript Thanks for such a quick reply. I do want to get information from the browser to the server. I just don't want the page to disappear when I do. Can I do this with a javascript? Can a javascript call a cgi |
| 13Nov04 Will [Email] ![]() |
In response to: calling cgi functions from onclick or javascript When something is sent to the server using CGI, the server must send something back. Otherwise, you get an Internal Server Error because the CGI process couldn't be completed. Three ways you might send something to a CGI program without having the browser re-load the page: 1. The returned content might be put into a DIV layer with an "invisible" attribute. 2. 3. There probably are other ways, too. |