1

How can I call a CGI function within a javascript function? Such like this:

function jsFun()  
{  
    //something that can call a CGI function  
}  

1 Answer 1

2

Try jQuery.

function jsFun() {
    $.post(YOUR_CGI_URL, YOUR_PARAMS);
}
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks a lot. In this method, how can my cgi function(C function) obtain the params transfered by the js?
Your C code can read from stdin. See this tutorial for guidelines how to do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.