Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI and Ajax communication

Status
Not open for further replies.

xs2punit

Programmer
Jun 9, 2010
1
US
I am using C based CGI on my linux system and in my form I upload a file:

"<form id=\"systemupdate_form\" action=\"SaveSystemUpdate.cgi\" onsubmit=\"return (polling_start() && ValidateForm(this));\" enctype=\"multipart/form-data\" method=POST>\n"


SaveSystemUpdate.cgi : gets called when the user hits the upload button.

polling_start(): is a javascript function where Ajax keeps asking for the updated value(number of bytes being copied) from another xyz.cgi script. The contents of this cgi is: system("some command");

The whole structure is logically correct, but the xyz.cgi returns Ajax status to be 0 or 500 most of the time.
 
You probably need to change xyz.cgi to do system("some other command");

If you want a more specific and detailed answer, you're going to need to ask a more specific and detailed question; specifically one with some actual code and/or a url in it.


-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top