CGI and external JavaScript nightmare

IamIan iansan at gmail.com
Wed Oct 17 13:29:29 EDT 2007


Thank you for the replies. After a lot of research I tracked down the
issue. I was using the CGI to build all of the pages for the site,
then filling in content with .innerHTML= as users clicked on tabs.
Since I wanted to place the Google Ads in different parts of each
page, the Google Ads JavaScript was in each page chunk being
dynamically placed with .innerHTML.

It turns out that JavaScript isn't executed when it is placed in a
page via .innerHTML. I tried some tricks to execute it after it was
added to the page (eval, appendChild) but it still didn't work. The
Google Ads JavaScript is very touchy and their agreement is very
strict; it wasn't even clear that what I was doing was in line with
it, so I broke the site up into multiple CGI pages and now it works
fine.

One CGI question - since all of my CGIs are spitting out HTML is their
source code safe? wget and linking to the source deliver the output
HTML. Are there any other methods of trying to steal the source CGI I
need to protect against?

Thank you.




More information about the Python-list mailing list