Welcome Guest, Not a member yet? Register   Sign In
Unable to load jquery frustrated
#11

[eluser]Sanjay Sarvaiya[/eluser]
Thankx InsiteFX,

I have one question ,The base_url without ending slash.
echo base_url() return with slash.


Code:
$config['base_url']  = 'http://localhost/Clajax';
echo base_url();//output  http://localhost/Clajax/ ;

As per output I think it's not compulsory with ending slash, am I right?
#12

[eluser]InsiteFX[/eluser]
If you read the CodeIgniter Users Guide it tells you to end it with a slash, you can also leave it blank and CI will try to figure out the base url!

They may have have added it on to it now in the old days it did not...
#13

[eluser]Sanjay Sarvaiya[/eluser]
Ya, I know about that.

Thank for your fast reply
#14

[eluser]InsiteFX[/eluser]
And this is the correct way to use the base site etc url.
Code:
<?php echo base_url('some/link'); ?>
#15

[eluser]Surrender[/eluser]
[quote author="InsiteFX" date="1337670239"]And this is the correct way to use the base site etc url.
Code:
<?php echo base_url('some/link'); ?>
[/quote]

hello Insite FX

you said base_url('assets/js/jquery.js')

and i echo base_url('assets/js/jquery.js')
guess what ? the result is still : http://localhost/CIajax/
#16

[eluser]Surrender[/eluser]
[quote author="InsiteFX" date="1337670239"]And this is the correct way to use the base site etc url.
Code:
<?php echo base_url('some/link'); ?>
[/quote]

then i echo site_url("assets/js/jquery.js")
it returned the results i wanted

#17

[eluser]Surrender[/eluser]
[quote author="InsiteFX" date="1337670239"]And this is the correct way to use the base site etc url.
Code:
<?php echo base_url('some/link'); ?>
[/quote]


the problem comes again

when i load js using src="<?php site_url('assets/js/jquery.js')?>;">

firebug in firefox shows src="http://localhost/CIajax/assets/js/jquery.js"

and i find i still couldn't load my jquery.js successfully

i gonna f**king crazy now !!!
#18

[eluser]InsiteFX[/eluser]
You have something else wrong then becuse that base_url comes from my app that loads jQuery!

Like I said maybe it does not like the CIajax try changing it to ciajax

Server are case sensitive




Theme © iAndrew 2016 - Forum software by © MyBB