javascript and xajax issue

nzrubin
nzrubin used Ask the Experts™
on
Hi guys!
im making photoalbum with tabs and im using xajax to load the tab only if user click on it.
(otherwise all the photoalbum images will load and this will take to long)

the problem is that the photo at the  tab N1 is not poping up as it does in the tab N2

here:
http://dvernik.net/empty_me/

the javascript that pops up the photo is:
click.js


thank you for your help

the script below is how xajax is on my page
<?php
require_once('xajax_core/xajax.inc.php');
 
$xajax = new xajax();
$xajax->registerFunction("myFunction");
 
function myFunction()
{
 
$newContent = '
<ul class="page" >
<div class="albm_title">South Island Ferry ride</div>
 
<li class="hz sub"><span><img src="http://dvernik.net/photoalbum/hidden/upload_thmb/PC270066.jpg" /></span>
<em>
<div class="photo_title"></div>
 
<img src="http://dvernik.net/photoalbum/hidden/upload/PC270066.jpg" alt="" title="" />
</em></li>
 
';
 
    // Instantiate the xajaxResponse object
    $objResponse = new xajaxResponse();
    
    // add a command to the response to assign the innerHTML attribute of
    // the element with id="SomeElementId" to whatever the new content is
    $objResponse->assign("SomeElementId","innerHTML", $newContent);
    
    //return the  xajaxResponse object
    return $objResponse;
}/// end function
$xajax->processRequest();
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
$xajax->printJavascript();
?>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Add this after line 28

// Bind the click gallery events to the images (?)
$objResponse->script("clickGallery('gallery');");

Open in new window

Author

Commented:
coooooooooollllllllllllll!!!!!!!!!!!!!!! thank you!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial