leonardo
Posts: 0
Joined: Thu Mar 14, 2013 7:04 pm

Problem with returning Storage Value to a page Element

That works, Sergiy.
The only issue left is getting the value of each of the text fields inside the listitem on Click event. None of the codes used work. Here are the results:

codealert("Clicked: " + $(this).text());/code : Shows text for all the labels in the list.

codealert("Clicked: " + Apperyio('tid').text());/code : Shows the text of the correct element in the first listitem only and not for the actual listitem clicked.

codealert("tid: " + element.text());/code : Shows nothing.

codealert("tid: " + tid.text());/code : Shows nothing.

Please, what works here to isolate the text of the required label in the required listitem?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Problem with returning Storage Value to a page Element

Please use JS code below for that:

prealert($(this).find("[name=tid]").text());/pre

here tid - name of the label component inside of that list item

leonardo
Posts: 0
Joined: Thu Mar 14, 2013 7:04 pm

Problem with returning Storage Value to a page Element

Thanks. Works okay.

Return to “Issues”