Welcome Guest, Not a member yet? Register   Sign In
How to .js files to your app?
#1

[eluser]Unknown[/eluser]
I'm trying to manualy add jquey and have this code in my view:

Code:
script type="text/javascript" src='.base_url().'js/jquery-1.3.2.js"></script

and js/jquery-1.3.2.js in DocumentRoot directory. When clicking on the script link "You don't have permission to access /js/jquery-1.3.2.js" is appearing.
I'm using Apache 2.2 and OS Windows.
Thank you.
#2

[eluser]Unknown[/eluser]
Problem is solved. Sorry.
#3

[eluser]kanjimaster[/eluser]
You appear to have several syntax errors in your code. In particular, you need to open the src attribute string with double quotes and wrap PHP tags around any php in your view so this would be better

Code:
script type="text/javascript" src="<?php echo base_url('js/jquery-1.3.2.js') ?>"</script




Theme © iAndrew 2016 - Forum software by © MyBB