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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

*.CSS & *.JS files

Status
Not open for further replies.

ceciliag8

Technical User
Mar 17, 2002
4
CA
I'm trying to help out a friend who is having problems with his website. The URL is For the past 2 days, he's been having problems with the Javascript, but he says he hasn't changed any of the .js files or the .css file. All he did was update the news page.
I've been testing it here at home, since I don't have access to his server, and the only difference I see from before is that he had his .css file in the root directory, and now it is in common.
This is how this was before:
<SCRIPT LANGUAGE=&quot;JAVASCRIPT&quot; src=&quot;/common/script.js&quot;></SCRIPT>
<SCRIPT LANGUAGE=&quot;JAVASCRIPT&quot; src=&quot;/common/scriptlayer.js&quot;></SCRIPT>
<LINK REL=&quot;STYLESHEET&quot; HREF=&quot;/common/style.css&quot; TYPE=&quot;text/css&quot;>
and I created a folder here named common, and saved those files in there. I was still getting the error messages.

If I moved the script.js, scriptlayer.js & style.css files to the directory where the news.asp file resides, and changed those lines to:
<SCRIPT LANGUAGE=&quot;JAVASCRIPT&quot; src=&quot;script.js&quot;></SCRIPT>
<SCRIPT LANGUAGE=&quot;JAVASCRIPT&quot; src=&quot;scriptlayer.js&quot;></SCRIPT>
<LINK REL=&quot;STYLESHEET&quot; HREF=&quot;style.css&quot; TYPE=&quot;text/css&quot;>
then it works fine.

Do those files need to be in the same directory?
Am I missing something else?
Thanks
C :)
 
I presume once the address to the javascript files and the CSS file are correct then I dont see any reason why they need to be in the same directory.

no help, sorry
É **new site coming soon**
**don't visit just yet**
 
Hi,
Can you tell me hierarchy of ur directories? How do you place files on your Web Server so that many of other people can also help you solve your problem. Because i think that the problem lies with the references you use to include the .js and .css files.
|-0

 
Hi,

Having looked at the news page and the way your directorys are done, at present on the news page, your *.css and *.JS are after the <HEAD> tag and before the <body> tag.

Try placing them after the <title> tag within the <head> before any reference for them occurs.

It worked when I download it and tried it out

James

E.g.

<html>
<head>
<meta name=&quot;GENERATOR&quot; content=&quot;Microsoft FrontPage 5.0&quot;>
<meta name=&quot;ProgId&quot;

content=&quot;FrontPage.Editor.Document&quot;>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html;charset=windows-1252&quot;>
<title>Simple Plan</title>
<SCRIPT LANGUAGE=&quot;JAVASCRIPT&quot; src=&quot;script.js&quot; tppabs=&quot;</SCRIPT>
<SCRIPT LANGUAGE=&quot;JAVASCRIPT&quot; src=&quot;scriptlayer.js&quot;

tppabs=&quot;</SCRIPT>

<LINK REL=&quot;STYLESHEET&quot; HREF=&quot;common/style.css&quot;

tppabs=&quot; TYPE=&quot;text/css&quot;>

<script language=&quot;JavaScript&quot;>
<!--
function

MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features);}/

/-->
</script>
</head>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top