Solved

Combining CGI and Javascript

Posted on 1997-05-12
2
171 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now