[support] Enabling jquery/AJAX (unknow is not a function)

Tim Johnson tim at akwebsoft.com
Wed Nov 14 01:00:11 UTC 2012


* Jamie Holly <hovercrafter at earthlink.net> [121113 15:42]:
> In Drupal 7, jQuery runs in no-conflict mode, so you can't use $ unless 
> it's wrapped. Change $ to jQuery.
 :) You nailed it all right! Only problem now is that the
 cross-domain kicks in. Error message:

 "XMLHttpRequest cannot load http://localhost/cgi-bin/cgitest.py.
 Origin http://localhost:8080 is not allowed by
 Access-Control-Allow-Origin."

So, I copied cgitest.py to scripts and now the function call is [code]
jQuery('#content').load('http://localhost:8080/drupal/scripts/cgitest.py');"
[/code]
now I get the entire file as content of the DIV : I.E.
#!/usr/bin/python print "Content-Type: text/html\n\n" print "HELLO
THERE"
How do I capture the stdout only?

thanks for the quick reply
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com


More information about the support mailing list