473,414 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

To use external .js file in CGI-Perl

If i use a .js file in HTML then its working.

<script src="Y:\Apache\cgi-bin\babts\activewidget\aw.js"></script>
<link href="Y:\Apache\cgi-bin\babts\activewidget\styles\xp\aw.css" rel="stylesheet"></link>

But if i included a .js file like,

<link href="../babts/activewidget/styles/xp/aw.css" rel="stylesheet" media="all" type="text/css">
<script src="../babts/activewidget/aw.js"></script>then its not working.

the error "object is undefined,object is null or not an object" comes.
How to get rid of it???
Oct 25 '06 #1
2 5260
miller
1,089 Expert 1GB
Well, ignoring that this isn't really perl related. The below link is obviously your problem:

<script src="../babts/activewidget/aw.js"></script>then its not working.
Whatever html file that contains this bit of code isn't able to find aw.js. Not knowing what the path of the html file is, and where it is "relative" to aw.js, I cannot tell you what the proper path would be. Just as a random guess, I would say remove the "..".
Oct 25 '06 #2
The reason included javascript (i.e. <script type="text/javascript" src="file.js">) does not work, is because must likely the "file.js" was placed in a directory that was configured as cgi. If you move the file outside the cgi path then you can reference it and it will work. ex. I moved my script file from:
/var/www/cgi-bin/apps/file.js to
/var/www/js/file.js.

This should work.
Aug 29 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: o'seally | last post by:
solaris/linux admins/rookie_developers that battle with this error are probably all frustrated when it happens. i bet you're also somehow frustrated by this seemingly unsolvable error :-) ...take...
7
by: Doug Helm | last post by:
Hey, Folks: I'm trying to write a very simple file upload CGI. I'm on a Windows server. I *am* using the -u switch to start Python for CGIs, as follows: c:\python\python.exe -u %s %s I...
1
by: chris.levis | last post by:
All: I have written a Python webapp under MS IIS 5.0 that does the following: -Does a CVS checkout of a particular bit of xml -Gets a list of valid cvs tags for that xml file -Based on user...
22
by: Long | last post by:
Problem: to insert the content of a file in an HTML document at a specific location. One possible way is to add a WebCharm tag like this: <%@charm:text 20 0 my_include_file.txt %> When the...
6
by: daniel kaplan | last post by:
hi all, very new to this (javascript and the likes) so this might range in the dumb cataegory. when i am saving my external javascripts on the same server as all my HTML and Perl, etc scripts,...
1
by: Derek Fountain | last post by:
I have a piece of text which is generated by an external CGI-alike method. That is, if I go to "http://myserver/cgi-bin/translate.pl?word=aardvark" I get back the translation of the given word. I...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
2
by: Muzammil | last post by:
Hi. i learn about cgi scripting in c++ from deitel & deitel. in this book he uses .cgi extension files while when i compile the file on windows platform is .exe. in book he browse the .cgi files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.