Z
zxo102
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?
Here is my case:
1. client side:
"load" is a javascript function in a html page. It starts the
python CGI "test.py" via Apache:
<html>
<script language="javascript">
....
load("test.py" );
....
</script>
....
</html>
I want test.py to "return" a "hello" back so the javascript function
load takes "hello" as argument like load("hello").
2. server side: test.py
....
#!c:\python24\python.exe
def main():
message = 'hello'
#return message
main()
....
Any ideas?
Thanks in advance for your help.
ouyang
How can I pass a string generated from python cgi at server side
to a
javascript function as an argument at client side?
Here is my case:
1. client side:
"load" is a javascript function in a html page. It starts the
python CGI "test.py" via Apache:
<html>
<script language="javascript">
....
load("test.py" );
....
</script>
....
</html>
I want test.py to "return" a "hello" back so the javascript function
load takes "hello" as argument like load("hello").
2. server side: test.py
....
#!c:\python24\python.exe
def main():
message = 'hello'
#return message
main()
....
Any ideas?
Thanks in advance for your help.
ouyang