zxo102 a écrit :
Hi everyone,
    How can I pass a string generated from python cgi at server side
to a
javascript function as an argument at client side?


This is common HTTP / javascriot stuff - nothing related to Python. First learn about the HTTP protocol - something you obviously need if doing web development -, then eventually google for XMLHttpRequest (or 'ajax').

To make a long story short: the client side doesn't give a damn about how the server-side works - it requests an url (-> read the part about "HTTP Request" in the rfc), waits for the response (-> read the part about "HTTP Response" in the rfc), and whatever it wants with the response. FWIW, HTTP requests can have a "query string" containing arguments.

From the server-side POV, your CGI script doesn't "return" anything - it generates a HTTP response, which will be sent back to the client by Apache.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to