httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Coby" <jc...@listingbook.com>
Subject Re: [users@httpd] cgi called from javascript line not working
Date Mon, 27 Jan 2003 21:29:15 GMT
> Well, since the exact same html file works on my web provider's site
> and doesn't work on an apache site I set up (and I use the exact
> same browser to look at both) I'm guessing it's not a browser issue,
> but rather an issue with how I set up the local apache server. Also,
> if I try IE5, IE6, Netscape 4.x, Netscape 6.x, or even Opera, I get
> the same results - OK on http://www.cyberlights.com , but not OK on
> my local server.

Ok, just wanted to make sure, you never know with things like this where you
have seven levels of indirection, each of which could mess it up.

> It's interesting how different browsers handle the "view source" command.
> With IE I simply see
>
> <script language="JavaScript"
> src="/cgi-bin/psinclude.cgi?template=copyright.txt">
>       </script>
>
> whether it works or not. But with Netscape, on my website I see the actual
> code that's in my copyright.txt file, but on my local server, where it
> doesn't work, it just shows the <script>...</script> line you see above.

I've found that mozilla is 100x easier to work with because of all the nice
debugging tools (such as this), and the emphasis on correctness.  I tend to
make things work on moz and then tweak it for IE and other browsers.

> Another thing I tried was I purposely put a wrong filename in for
> the template. Instead of template=copyright.txt I put in
> template=foo.txt. The cgi script spits out an error when the template
> isn't found. When I do this on my local server, I get no error, which is
> making me think that this script isn't even being called.

That's a good indication, yes.

> Now, there's nothing in apache where I can enable/disable the running
> of a javascript, right? That's all browser based. But is there something
> that would deny me from running a CGI from within a javascript command?

Correct, JS is all client-side.  And yes, there is something that would
prevent CGI from being parsed.  Try viewing the script directly in the
browser
(http://www.example.com/cgi-bin/psinclude.cgi?template=copyright.txt) and
see what you get.

I believe the option is +CGI?

-Jacob


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message