Houssan Hijazi
Posts: 0
Joined: Tue Jul 23, 2013 6:37 pm

Dynamic list with label, get label text on javascript click

Hi,

i have a dynamic list with label, how i can get the text label with javascript click event on the label?

thanks

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Dynamic list with label, get label text on javascript click

HI,

You can use next code:
precode
Appery("mobileselectmenu_16").find(":selected").text()
/code/pre
"mobileselectmenu_16" - component name.

Houssan Hijazi
Posts: 0
Joined: Tue Jul 23, 2013 6:37 pm

Dynamic list with label, get label text on javascript click

Sorry, but is not a selectmenu, is a label inside a dynamic list.

breadcrumbs: http://d.pr/i/2fag

i need get the text of label inside the list.

the click event is on label .

thanks

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Dynamic list with label, get label text on javascript click

Please try another code:
precode
$(this).text();
/code/pre

Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

Dynamic list with label, get label text on javascript click

I have multiple labels on my list item so how can i get the specific label value?
Like i have label for address, number and name.

I want to store the number in local storage only but using
$(this).text(); will return the text of all labels

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

Dynamic list with label, get label text on javascript click

Hello Tooba,

Please detail, what do you want to do. On what event do you want to get values? Do you want to on click list items get values of labels, which are inside it?

Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

Dynamic list with label, get label text on javascript click

Solved this issue :)
Thanks
I use $(this).find("[name=lblStatus]").text()

Return to “Issues”