• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loading assets (js, css, ...)

#11
[eluser]Pascal Kriete[/eluser]
[quote author="Seppo" date="1223233554"]... if you have the relative path in the JS and you don't want to change it, you can use "base" tag[/quote]
When javascript sees this:
Code:
fileBottomNavCloseImage: 'images/closelabel.gif',
It tacks that to the end of the current url.

#12
[eluser]Dauntless[/eluser]
Owh, I must have read over that line; sorry.

I tried it, but no go:
Code:
<head>

<base href="<?=base_url();?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

It's still looking for /user/images/closelabel_gif

#13
[eluser]manilodisan[/eluser]
In your header:
Code:
<s\cript type="text/javascript">
        var base_url = '&lt;?= base_url () ?&gt;';
</\script>

Code:
In your javascript files where you need absolute url's:
fileBottomNavCloseImage: base_url + '/images/closelabel.gif',

Can you believe the XSS filtering here.....Tongue

#14
[eluser]Dauntless[/eluser]
But that would, once again, make me go through the entire lightbox script and look for paths ...

I'll try it (hoping it will only be the images), but hasn't anyone else tried implementing LightBox ?

#15
[eluser]manilodisan[/eluser]
[quote author="Dauntless" date="1223255150"]But that would, once again, make me go through the entire lightbox script and look for paths ...

I'll try it (hoping it will only be the images), but hasn't anyone else tried implementing LightBox ?[/quote]

Yes I did...it's only 1 path at the start of the file...

#16
[eluser]Dauntless[/eluser]
Alright, Thanks! I've adjusted the 2 paths at the beginning and it appears to be working.

Thank you, Manilodisan for giving the final answer, and to every body else who helped out Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.