Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

How do I refer to label in Collapsible header?

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]")

Image

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

How do I refer to label in Collapsible header?

Hello Aeneas,

Please try this code:

code$(this).closest('[data-role="collapsible"]').find('[name="lblHeaderMsg"]')/code

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

How do I refer to label in Collapsible header?

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();

Image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How do I refer to label in Collapsible header?

Hi Aeneas,

Your code works for us. Could you please double check component names? Try debugging the code step by step.

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

How do I refer to label in Collapsible header?

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.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

How do I refer to label in Collapsible header?

Hello,

Please try this code:
prevar collapse=$(this).closest('[data-role="collapsible"]');
collapse.collapsible("collapse");/pre

Return to “Issues”