I have been trying to make a page which combines web.py and
JavaScript, and with the following code:

$code:
     def getContents(fname):
          a = req.get(fname)
          return a.content

<script type="text/javascript">
     document.write("$getContents('http://mysite.net')");
</script>

(Where req is passed on my template's $def with(), being a module
object of the Python Requests (http://python-requests.org), from which
I execute methods.)

Problem is, the document is blank, which means the document.write
function got no input. Is there a way around this? Am I doing this in
a wrong way?

Thanks in advance,
~ theiostream.

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to webpy@googlegroups.com.
To unsubscribe from this group, send email to 
webpy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to