Jump to content

Wont load Javascript Files on Server


gaza165

Recommended Posts

Hi all...

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="css/style.css" rel="stylesheet" type="text/css"/>
<title>Shoutbox</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/shoutbox.js"></script>
<script type="text/javascript" src="js/countdown.js"></script>
</head>
<body>

 

i have added javascipt files onto my webpage... however when i upload this to the web, it does not do any of the javascript that i have included.

 

Is there something i have done wrong here??

 

Thanks

 

Garry

Link to comment
https://forums.phpfreaks.com/topic/153620-wont-load-javascript-files-on-server/
Share on other sites

its often best to not use relative urls for these kind of assets.

 

personally i place all my global assets in a folder in the root, e.g. 'global'

 

then refernce them like so

 

<script type="text/javascript" src="/global/js/jquery.js"></script>

<script type="text/javascript" src="/global/js/shoutbox.js"></script>

<script type="text/javascript" src="'/global/js/countdown.js"></script>

 

I suggest you down load the firebug plugin for firefox and use it to debug - there maybe a javascript error which is killing your functionality here...

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.