mmarif4u Posted May 9, 2007 Share Posted May 9, 2007 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 More sharing options...
stockton Posted May 9, 2007 Share Posted May 9, 2007 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 More sharing options...
mmarif4u Posted May 9, 2007 Author Share Posted May 9, 2007 Thanks man for reply, i got it solved. the problem was in the file which i include. there i mention the script tags i remove that one and now working fine. Link to comment https://forums.phpfreaks.com/topic/50613-solved-external-link/#findComment-248927 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.