Skip to main content
Inspiring
January 30, 2009
Question

cfdiv and jQuery

  • January 30, 2009
  • 1 reply
  • 1304 views
Hi All,

I have a cfdiv which is bound to a page that displays the results of a query. on the same page as the cfdiv I have a form which get submited using ColdFusion.Ajax.submitForm once the process has been finished I use ColdFusion.navigate to refresh the cfdiv to display the updated query results.

Now the problem I have is im trying to select the new item in the query within a jquery function.

Each row in the results is surrounded with a div with a class of .userListItem

so I use $('.userListItem:eq(0)') to select the first occurence of a div with the userListItem class. This doesn't work when the item is within a cfdiv, but it does work if I put the item outside a cfdiv.

Does anyone have any ideas what the problem is?

Thanks, Richard
This topic has been closed for replies.

1 reply

Participating Frequently
October 26, 2010

By any chance does anyone have an answer to this problem?  I have run across the same thing.

Pages loaded into a cfdiv don't respond to jquery commands, whether I put the jquery on the parent page or on the bound page itself.

Any suggestions would be appreciated.  I tried using a cflayout accordion instead, but it added whole new layers of headaches that just weren't worth any more time than I already spent on them.

Thanks for your time

Participating Frequently
October 26, 2010

Go figure, after trying and trying, I post the question and then figure out the answer.

Instead of using document.ready, I used AjaxOnLoad and it worked.

Many thanks to Ray Camden for offering this suggestion on another issue, it worked here as well!!