JQuery Ajax problem=Weird- works once stops next

Hi,
I’m facing a weird problem with jquery and ajax calls.

I’ve a page which has a search box and also a listin which says “join”.

Search uses Ajax calls.
Join uses jquery call which opens a thickbox.

for the first time when page is loaded, thickbox works perfectly.
But after i do search and then with the searched results if i do “join”,
thick box stops working.

I’ve added thickbox.js
then jQuery.noConflict()
and then prototype.js

I find this order to be perfect to avoid any conflicts.

Is there any thing am missing?
Can anyone help?
Thanks in advance.

Preethi S. wrote:

Hi,
I’m facing a weird problem with jquery and ajax calls.

I’ve a page which has a search box and also a listin which says “join”.

Search uses Ajax calls.
Join uses jquery call which opens a thickbox.

for the first time when page is loaded, thickbox works perfectly.
But after i do search and then with the searched results if i do “join”,
thick box stops working.

I’ve added thickbox.js
then jQuery.noConflict()
and then prototype.js

I find this order to be perfect to avoid any conflicts.

Is there any thing am missing?
Can anyone help?
Thanks in advance.

Added by me:
I proceeded one step further and found the reason of this problem.
The reason is
I’m doing page.replace_html to place my listing where i’m having the
“join” button.

My thickbox.js is having a document.ready ready function which prepares
are the places where thick box has to be applied.
When i do search, document.ready is not called. So links are not
identified.Thats why.

Now i found the problem but i dont know how to solve it.
I’ve added
<%= javascript_include_tag ‘thickbox.js’%>
in my partial also. Still it is not calling the ready function eveytime
i do search.
HOw to solve it? does anyone have a solution.
Thanks