I am running locally and using Lightbox2 (
Lightbox2)
to open a picture from a thumbnail
see site : http://www.ceramique-isabelle.fr (see ceramiques, click
thumbnail, then click the left picture)
in my layout I wrote this line to load the js in sequence as stated by
lightbox2
<%= javascript_include_tag ‘prototype’, ‘scriptaculous’, ‘lightbox’,
‘widgEditor’, ‘application’, :cache => true %>
and the lightbox link is :
<%= image_tag( left_box_image(@c, @p), :size =>
@left_image_size, :border => 0, :id => ‘imageLeft’) -%>
with a helper to build the link according to the clicked image
big_image_link(c, p)
return “#{WWW_HOST}/images/#{params[:controller]}/big/
#{params[:controller][0,1]}” + c.to_s + “d” + p.to_s + ‘.jpg’
so locally I get : <a href=“http://localhost:3000/images/aquarelles/
big/a1d0.jpg” …
and the image displays into the lightbox.
I can even use a link to my web server, and running locally , the
image displays too… !
<a href=“http://www.ceramique-isabelle.fr/images/aquarelles/big/
a1d0.jpg” …
but when running from the web server, the image doesn’t display, I get
a js error :
Error : Builder is not defined
Source file :
http://www.ceramique-isabelle.fr/javascripts/all.js?1220286151
LIne : 4417
then (which seems normal to get this 2 error after the first… )
Error : $(“overlay”) is null
Source file :
http://www.ceramique-isabelle.fr/javascripts/all.js?1220286151
Line : 4494
what could be different between my web server and my local server …
(same Rails level… 2.1)