Solved

Combining CGI and Javascript

Posted on 1997-05-12
2
181 Views
Last Modified: 2013-12-25
I am writing CGI in perl which creates HTML documents on the fly. Within the HTML is Javascript.

To test this process I first of all create dummy html files which contain the Javascript to ensure that the Javascript works correctly.

Secondly I write a script to create the desired output. I pipe this output to a html file and ensure that the html is correct (as in part 1).

However when the script is installed on the server (so that the html is output to the browser) the Javascript fails to run. It is as if the Javascript was not even present although a 'View Source' shows that it is correct.

This is running on an Intranet system with Netscape 2.

Any ideas?
0
Comment
Question by:tanstaafl
2 Comments
 
LVL 5

Accepted Solution

by:
icd earned 200 total points
ID: 1828008
I had a similar (if not identical) problem some time ago.

In my case I found that I had 'hidden' the script from older browsers using the format...

<SCRIPT LANGUAGE="javascript"><!--
.
.
.
//--></SCRIPT>

And for some reason it was the comment part that confused the browser into ignoring all the script!

Remove the comment and you will probably find it will work. Since you are running on an Intranet with Netscape there is no need for it.
0
 

Author Comment

by:tanstaafl
ID: 1828009
Thanks. That worked, and a very quick reply too. :-)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question