简体   繁体   中英

How to get result back from CGI(C) to the same HTML page?

Can I display the result which is processed in the CGI(using C) on the same html page, from where the CGI is invoked?

Regards, MalarN

No, HTTP does not work that way.

You would have to make a asyncronious request (using JavaScript, this is commonly known as AJAX) instead.

In a nutshell, you can spawn a background HTTP request to your CGI process, instead of posting the browser to it in the main HTTP request.

See this: http://en.wikipedia.org/wiki/XMLHttpRequest

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM