Page 1 of 1
How do I refer to label in Collapsible header?
Posted: Wed Jul 02, 2014 7:44 am
by Aeneas McBurney
I have a button in a collapsible and want to refer to a label in the header. I have tried a few options but can't seem to find it. Please see screenshot. I want to refer to 'Send Reply' label on button click within the collapsible. This doesn't work as only finds items within the collapsible not the header.
$(this).parent().find("[name=lblHeaderMsg]")
How do I refer to label in Collapsible header?
Posted: Wed Jul 02, 2014 8:08 am
by Evgene Karachevtsev
Hello Aeneas,
Please try this code:
code$(this).closest('[data-role="collapsible"]').find('[name="lblHeaderMsg"]')/code
How do I refer to label in Collapsible header?
Posted: Wed Jul 02, 2014 8:28 am
by Aeneas McBurney
There are multiple collapsibles populated by a recordset and I want to refer to just the active message header area where the button was pushed. I have tried this code and it doesn't show the label and the message returned looks like its including other labels as per screenshot. The label is called lblReplySent and is hidden on load but I want to show it.
var lblMsgStatus = $(this).closest('[data-role="collapsible"]').find('[name="lblReplySent"]');
alert(lblMsgStatus.text());
lblMsgStatus.text('Sending Message');
lblMsgStatus.show();
How do I refer to label in Collapsible header?
Posted: Wed Jul 02, 2014 3:22 pm
by Kateryna Grynko
Hi Aeneas,
Your code works for us. Could you please double check component names? Try debugging the code step by step.
How do I refer to label in Collapsible header?
Posted: Wed Jul 02, 2014 10:21 pm
by Aeneas McBurney
I want to actually collapse the current collapsible after clicking the button within the collapsible. This code doesn't work.
var collapse=$(this).closest('[data-role="collapsible"]').find('[name="collapseContact"]');
collapse.collapsible("collapse");
where collapseContact is the name of my collapsible item.
How do I refer to label in Collapsible header?
Posted: Thu Jul 03, 2014 1:35 am
by Alena Prykhodko
Hello,
Please try this code:
prevar collapse=$(this).closest('[data-role="collapsible"]');
collapse.collapsible("collapse");/pre
How do I refer to label in Collapsible header?
Posted: Thu Jul 03, 2014 9:30 pm
by Aeneas McBurney