question
0
Votes
Votes
1
Answer
Answer
M$0.00
I want the code to call the initialize function of lightbox.js by using AJAX (not on each page load alone).
I am using cakePHP to develop my application. I have listed out the set of users and when the click on the username i am using lightbox to display the usersdetails. i have done paging in AJAX using protoype.js. when i click on the username the details gets appeared in the lightbox in the firstpage.When i click on the next pages(ie paging) the lightbox function initialize is not called since it has been written in pageload . "Event.observe(window, 'load', initialize, false);" .Using AJAX paging since the page is not refreshed it gets loaded only for the first time and when i go to the next pages the fumction is not called. I want the code to call the function on either mouseover or onlick
The asker of this question selected no best answer.
answers (1)
can you not just do something like this:
<script>function nextpage() {
make ajax request to show next page.
... request callback function
{
initialize(); //initialize lightbox
}
}
</script>
<a href="javascript:nextpage()">Next Page</a>
<script>function nextpage() {
make ajax request to show next page.
... request callback function
{
initialize(); //initialize lightbox
}
}
</script>
<a href="javascript:nextpage()">Next Page</a>
Related questions
140 characters left












