src not working

src is not working in my JSP page's script tag.

Page 1 of 1

3 Replies - 1283 Views - Last Post: 05 July 2010 - 08:18 AM

#1 Guest_Rupak Hazra*


Reputation:

src not working

Posted 02 July 2010 - 01:56 AM

<head>
<title>Bank Holiday page</title>
<meta http-equiv="Content-Type" content="text/html;">
   <script language="javascript" type="text/javascript" src="calendar.js"></script>
   <link href="calendar.css" rel="stylesheet" type="text/css">
</head>




in this code the src is not working. it is not including the .js file or .css file.
Any help will be very welcome.

This post has been edited by PsychoCoder: 02 July 2010 - 07:32 AM
Reason for edit:: Code tags added


Is This A Good Question/Topic? 0

Replies To: src not working

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 4136
  • View blog
  • Posts: 13,051
  • Joined: 08-June 10

Re: src not working

Posted 02 July 2010 - 04:44 AM

it looks correct (despite the language attribute being deprecated). maybe you’re not referencing correctly?
Was This Post Helpful? 0
  • +
  • -

#3 teampoop  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 17
  • View blog
  • Posts: 140
  • Joined: 19-June 08

Re: src not working

Posted 02 July 2010 - 11:56 AM

Check your path. Say your file is in the js directory. Then your source would be "/js/calendar.js"
Was This Post Helpful? 0
  • +
  • -

#4 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 358
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: src not working

Posted 05 July 2010 - 08:18 AM

Try this:

<head> 
<title>Bank Holiday page</title> <meta http-equiv="Content-Type" content="text/html;">    
<script type="text/javascript" src="scripts/calendar.js"></script>    
<link href="styles/calendar.css" rel="stylesheet" type="text/css"> 
</head>


I've changed your code a little. First off to make you website more organized create two folders called scripts and styles. Save calendar.js in scripts and calendar.css in styles. Then double check that you spelled everything right. Also when you did
<script language="javascript" type="text/javascript" src="calendar.js">
when you don't need it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1