Welcome Guest, Not a member yet? Register   Sign In
cant load jQuery ... Access denied
#1

[eluser]thomas_86[/eluser]
Hello,

i want to use jQuery in my little project, so i loaded the js-file ...
Code:
[script src="http://localhost/ci/application/assets/js/jquery-1.4.2.js" type="text/javascript"][/script]

But the js-file didnt get loaded, so i try to type in the url and get a ACCESS DENIED error? How to solve this problem? Editing the .htaccess?

Greets
soyo
#2

[eluser]InsiteFX[/eluser]
Try this:
Code:
// Replace $ with s in script tags!
<$cript src="&lt;?php echo base_url();?&gt;assets/js/jquery-1.4.2.js" type="text/javascript"></$cript>

If that does not work then you a permissions problem with the assets directory.

InsiteFX
#3

[eluser]thomas_86[/eluser]
If i put the assets folder in the /application folder i get the permissions problems. However i put it in the root-directory all works.

I think for a clean structure, the assets folder have to be in the /application folder.

my .htaccess loke like atm:
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|xampp|labs|templates|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
#4

[eluser]InsiteFX[/eluser]
The code I gave you above is for the assets directory to be in the root, base_url returns the root of your site or what you have defined in the config.php file.

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB