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> Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.