Skip to main content
Inspiring
Jan 30, 2009 10:04 PM UTC
Question

cfdiv and jQuery

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 is closed to new replies. Start a new post to keep the conversation going.

2 replies

Participating Frequently
Oct 26, 2010 3:25 AM UTC

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

Translate
Participating Frequently
Oct 26, 2010 4:12 AM UTC

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!!

Translate