Tutorialtest
Tutorialtest
$(this).text() works because when you add JS on Click event inside the JS function "this" means current element.
When you call Tiggzi('filteredName').text(), Tiggzi('filteredName') references on first found in the document object with dsid="filteredName". In DOM first object with dsid="filteredName" is hidden object used for mapping. For example you can check all label values on page (including hidden) with dsid:
code$('[dsid=filteredName]').each(function(){alert($(this).text());})/code
Could you also clarify what are you trying to achive using codeTiggzi('filteredName').text()/code and why don't you use $(this).text()?
Not sure I understand what does "isolating the name through the text of the label and image" and "extract the story node from the DOM" mean. Could you tell us expected result after you click on image and/or label Rodrigo Mull for example?
Thanks Marina for your clear explanation. I now understand why codealert($(this).text());/code works directly and codeTiggzi('filteredName').text()/code didn't.
By using codeTiggzi('filteredName').text()/code I wanted to see if there is a Tiggzi function that works like: codealert($(this).text());/code with your explanation, that I got that now.
What I want to do after click on image and/or label of Rodrigo Mull, for example, is to capture or collect the story for Rodrigo, which is stored in the story element (along with its children -- the H1 and P elements). So that I can convert it to HTML and get it displayed in the Panel component of Detail Page. That's what I've been battling.
Essentially, I just want to know how to actually display the story for each clicked name in the Panel component.
Hi Leonardo,
You can apply HTML code to Panel using the folowing JavaScript code:
codeTiggzi('panelComponentName').html("<h2>Heading</h2>");/code
Thanks Katya. But when I click Rodrigo how do I get the text within the story node pertaining to him? That's what I need to show in the panel component.
Could you please clarify where you store "story node", from what you want to get data? Is it stored in some page component or in database or somewhere else?
it's in the the xml that is loaded into the REST service. I have shared the project if you want to examine it,
What is the shared app name?
Hello! You would need to save data from REST Service to some global variable (not localStorage variable). To do this add on Rest Service success event next code:
codewindow.namesData = data.name.person;/code
Then on Click event on image or Label using JS check array windows.namesData and find necessary data.