Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moved from Windows IIS to Apache Linux...javascript not working now

Status
Not open for further replies.

Trekkie

Technical User
Apr 29, 2000
150
CA
Hi,

I have a website that worked fine under Windows IIS until I moved it to RH 3.0 with Apache 1.3.31. Now, my javascript is not working...

My index.htm

<script language="JavaScript1.2" fptype="dynamicanimation" src="myscript.js"></script>


Apache Error log:

(8)Exec format error: exec of /home/domain/cgi-bin/myscript.js failed
Premature end of script headers: /home/domain/cgi-bin/myscript.js


I did "chmod 755 myscript.js"

I'm not a javascript developer so I don't know if you need to do any changes to the script.

I appreciate any advice

T.k.


[purpleface]
 
It sounds like Apache is trying to run those JavaScript files rather than just sending them to the browser.

As a first step, a chmod of 644 would probably be more appropriate for the file.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
src="myscript.js"></script>

is not going to work unless there exists some sort of Windows scripting Host on the Linux, which probably does not exist.
 
cdlvj, I believe what you said is incorrect.

That directive is supposed to tell the browser to load the client side JS script from a separate URL. Much the same way a CSS can be inline or in its own file. I use that sometimes to segregate my JS from server side code.

Reference:
src URL Defines a URL to a file that contains the script (instead of inserting the script into your HTML document, you can refer to a file that contains the script)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top