Jump to content

Not reading external script.


shadowayex

Recommended Posts

All my pages have 4 external script sheets connected to them. There's two that are required for a nifty navigation menu, one that holds AJAX functions, and one that holds regular JS functions. Well, the one that holds the normal functions isn't getting read properly. When I try to look at it in a debugger (Firebug and DebugBar), the debugger doesn't even recognize the file is connected. The file is called functions.js and the contents are:

/*---------------------------------------------------------                  Resize News Functions---------------------------------------------------------*/function expandClub() {    document.getElementById("club").style.width = "100%";    document.getElementById("club2").style.width = "696px";    document.getElementById("site").style.display = "none";}function expandSite() {    document.getElementById("site").style.width = "100%";    document.getElementById("site2").style.width = "696px";    document.getElementById("site2").style.marginLeft = "0px";    document.getElementById("club").style.display = "none";}function backToNormal() {    document.getElementById("club").style.display = "block";    document.getElementById("club").style.width = "";    document.getElementById("site").style.display = "block";    document.getElementById("site").style.width = "";    document.getElementById("club2").style.width = "330px";    document.getElementById("site2").style.width = "330px";    document.getElementById("site2").style.marginLeft = "5px"}/*---------------------------------------------------------                New Choices for Vote---------------------------------------------------------*/var i = 1;function addChoices() {    numofchoices = prompt("How many choices?","1");	if(i > 1) {	    numofchoices = (i * 1) + (numofchoices * 1); 		numofchoices = (numofchoices * 1) - 1;	}	while(i <= numofchoices) {	    document.getElementById("newchoices").innerHTML += "Choice " + i + ": ";		document.getElementById("newchoices").innerHTML += "<input type=\"text\" style=\"width: 400px;\" name=\"choice" + i + "\" value=\"\" /><br />";        i = (i * 1) + 1;	}	document.getElementById("newchoicesform").style.display = "block";	document.getElementById("numofchoices").value = numofchoices;}/*---------------------------------------------------------                Pop Up for Admin Tools---------------------------------------------------------*/var features="status=no,scrollbars=no,resizable=no,menubar=no,width=500,height=400,top=0,left=600";function Info(x){    //window.name = "HelpWindow";    var openit = window.open(x, "HelpWindow", features);}

The file is linked like:<script scr="JS_Files/functions.js" type="text/javascript"></script>I thought maybe one of the style sheets above it may have had a closing error or something, but when moved to the top there's still no result. It's like it doesn't exist (which I checked the path and filename, it's correct). I've made every check I could think of. These scripts work fine if I write them directly in the file, but that causes some validation errors because of escapes and whatnot. Is there some kind of hidden problem I don't know about?

Link to comment
Share on other sites

<script scr="JS_Files/functions.js" type="text/javascript"></script>
If you copied/pasted that line, your browser will have a hard time reading the "scr" attribute. :)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...