Title: How to access content inside a panel? Post by: tslatt on December 15, 2011, 10:00:46 AM I hope this is an easy one... Given a panel with ajax loaded content, how can I access the content within that panel? For example, a panel is returned from the onLoad event of a tab. I want to find a div inside that panel that has a class of "aportal" and get its id.
Code: onLoad: function(p) { Thank you for any help!! Title: Re: How to access content inside a panel? Post by: stworthy on December 15, 2011, 06:54:54 PM onLoad:function(){
var id = $(this).find('.aportal').attr('id'); alert(id); } Title: Re: How to access content inside a panel? Post by: tslatt on December 16, 2011, 08:35:07 AM Thank you so much! At first it didn't seem to work. It was finding the first instance of those classes on the page, not the instance within the specific panel. But, just changing "this" to "p" in your code worked!
onLoad:function(p){ var id = $(p).find('.aportal').attr('id'); alert(id); } |