Welcome Guest, Not a member yet? Register   Sign In
Including Javascript files
#1

[eluser]Alhazred[/eluser]
I've already read many threads about this, but no one solved my problem.

I've put my js file into a folder named js into the root, at the same level of CI index.php

Inside the view where I want to use the js file I've put
[script type='text/javascript' src='<?php echo base_url() ?>js/check.js' ][/script]
I've used the proper < and > in place of [ and ] in my code.

looking at the page source code the src is correct: http://localhost/js/check.js but the code doesn't work.
If I click on the link shown in the page's source code I get an error for file not found.

May that depend on the htaccess file and rewrite rules?
I've used htaccess to remove the index.php from the url.

If htaccess is not a problem, what should I try to fix this problem?


Messages In This Thread
Including Javascript files - by El Forum - 07-09-2012, 07:46 AM
Including Javascript files - by El Forum - 07-09-2012, 09:53 AM
Including Javascript files - by El Forum - 07-09-2012, 09:56 AM
Including Javascript files - by El Forum - 07-09-2012, 10:01 AM
Including Javascript files - by El Forum - 07-09-2012, 10:08 AM
Including Javascript files - by El Forum - 07-09-2012, 10:16 AM
Including Javascript files - by El Forum - 07-09-2012, 11:50 AM
Including Javascript files - by El Forum - 07-09-2012, 12:47 PM
Including Javascript files - by El Forum - 07-10-2012, 03:28 AM
Including Javascript files - by El Forum - 07-10-2012, 05:51 AM
Including Javascript files - by El Forum - 07-10-2012, 08:13 AM
Including Javascript files - by El Forum - 07-10-2012, 08:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB