I'm confused. What did you read and what did you do? To sort it out with any hope of certainty, I would need a link to your pages that are having the problem.Originally Posted by willymonster
I'm confused. What did you read and what did you do? To sort it out with any hope of certainty, I would need a link to your pages that are having the problem.Originally Posted by willymonster
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
hi John,
sorry for the confusion. here's what i am having problems with. ajax menu bar + lightbox. on the site, www.66mott.com - when you click on gallery and click any of the image links, instead on initiating the lightbox feature, it loads the picture on a new page. i noticed that the lightbox feature only works on the index page, maybe because of the ajax menu bar i am using.
here is an example of 2 links on how it looks like on my index.php page:
('../menufolder/gallery.html', 'contentarea');">Gallery</a></li>
<li><a href="javascript:ajaxpage[/COLOR]('../menufolder/press.html', 'contentarea');">Press Review</a></li>
i created a gallery.html page to put the lightbox feature in it, but when i click it, it opens the picture on a new page WITHOUT activating the lightbox feature.
here is what the information i have on my gallery.html page.
<script type="text/javascript">
function pollContent(id){
if(document.getElementById(id)){
initLightbox();
document.getElementById(id).id="";
}
else
setTimeout("pollContent('"+id+"')", 60)
}
</script>
<script type="text/javascript" src="../root/js/prototype.js"></script>
<script type="text/javascript" src="../root/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="../root/js/lightbox.js"></script>
this is to activate the lightbox. i hope this helps.
thanks,
This stuff on your gallery.html is useless, get rid of it:
You also need an element on gallery.html - at the end of gallery.html - with a unique id like so:Code:<script type="text/javascript"> function pollContent(id){ if(document.getElementById(id)){ initLightbox(); document.getElementById(id).id=""; } else setTimeout("pollContent('"+id+"')", 60) } </script> <link type="text/css" rel="stylesheet" href="../index.php"/> <script type="text/javascript" src="../root/js/prototype.js"></script> <script type="text/javascript" src="../root/js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="../root/js/lightbox.js"></script> <link rel="stylesheet" href="../root/css/lightbox.css" type="text/css" media="screen" />
That polling function looks OK for use with lightbox but, it belongs on the 'top' page, I believe that is your index.php page. It could do with a little error checking though:HTML Code:<a href="../images/01.jpg" rel="lightbox[roadtrip]">Start</a> <a href="../images/02.jpg" rel="lightbox[roadtrip]">image2</a> <a href="../images/05.jpg" rel="lightbox[roadtrip]">image3</a> <span id="unique1"></span> </body> </html>
Also on that page use this:Code:<script type="text/javascript"> function pollContent(id){ if (document.getElementById&&document.getElementById(id)){ initLightbox(); document.getElementById(id).id=""; } else if (document.getElementById) setTimeout("pollContent('"+id+"')", 60) } </script>
Code:<li><a href="javascript:ajaxpage('../menufolder/gallery.html', 'contentarea');" onmousedown="pollContent('unique1');">Gallery</a></li>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Hi!
I have a question about ajax script.
On this page: http://kensai.php1h.com/test/ajaxtabscontent/demo.htm i have put a ajax script, and when for example i click on dog in ajax script it is bringing a external2.htm page. And there i have a thumbnail picture of dog and when i click on it, it is needed to open with lightbox 2.0 script, but when i click on this thumbnail it will only open picture on a white background without lightbox script effect.
But when i go here to the external2.html page at: http://kensai.php1h.com/test/ajaxtab.../external2.htm and try to click on a picture it is opened with a lightbox srcipt.
I relly dont know how to solve this problem.
Try reading all of the above posts in this thread.Originally Posted by Kensai_1
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks