Jump to content

[SOLVED] External link


mmarif4u

Recommended Posts

hi,

I know that this is not a complex issue ,i tried my best on it but no luck.

 

I have a php pages where i want to put the js script as externaly.

i have this code but not working.

If i put the code directly in the head area then works but externaly linking is not working.

 

<head><title>» School Registration From</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT language="JavaScript" src="script.js" type="text/javascript"></SCRIPT>
<script language="javascript" src="script.js"></script>
<link rel="stylesheet" href="styles/style.css" type="text/css">
</head>

Link to comment
https://forums.phpfreaks.com/topic/50613-solved-external-link/
Share on other sites

Why have you included the script.js twice? The 1st one should be fine but see below.

Remove the 2nd one and then possibly your code should work.

Do you have the .js files in the default folder? ie In the same folder as the PHP/HTML?

An example that works for me is:-

<HTML>

 

<HEAD>

 

<title> Ticket Issue </title>

 

<link rel="stylesheet" type="text/css" href="style/style.css">

 

<script language="JavaScript" type="text/javascript" src="js/TicketIssueFunctions.js"></script>

 

<script language="JavaScript" type="text/javascript" src="js/ajax.js"></script>

 

</head>

 

Note that the js folder mentioned above is in a folder subsidiary to the one containing my PHP & HTML.

Link to comment
https://forums.phpfreaks.com/topic/50613-solved-external-link/#findComment-248825
Share on other sites

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.