?
Solved

Combining CGI and Javascript

Posted on 1997-05-12
2
Medium Priority
?
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
icd earned 400 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

800 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