codeTiggzi.getImagePath('page_logo');/code
gives the url of the image referenced in Tiggzi. But I want to reference the actual name of the image, like: "foo_2.jpg" so as to isolate the "foo_2" when the image is clicked.
codeTiggzi.getImagePath('page_logo');/code
gives the url of the image referenced in Tiggzi. But I want to reference the actual name of the image, like: "foo_2.jpg" so as to isolate the "foo_2" when the image is clicked.
Hi Leonardo,
To get file name on image click use Run JavaScript action with the following code:
codevar urlParts = this.src.split('/')
var imageName = urlParts[urlParts.length - 1];/code
Thanks, Katya. That did it.
In trying to get a similar result from clicking a label component I thought one of these codes would do it, but it never happened:
codealert("clicked: " + Tiggzi('LabelComponetName').val());
alert("clicked: " + Tiggzi('LabelComponetName').text());/code
Hello! Here is the correct option
codeTiggzi('LabelComponetName').text()/code
Please check component name (by the way it's case sensitive)
Ok, I see what it going on. In the UI of the label component that I named filteredName I put : "matching name" as a default text. When I used the code you provided, which I have used before:
codealert(Tiggzi('filteredName').text());/code, it gave me this:
[quote:]matching name[/quote] the default text in UI, instead of the name populated from the rest service.
Looks like you map some results and because of it have a few labels with the same name, or maybe you call that function before you map result. Could you check it and clarify?
It's kind of strange because the image component and the label component are mapped at the same time to their respective responses, giving the relevant picture and names that match a search criteria. When the image it clicked, the code given above works well. The code for the label should work as well. But no. However, this code works: codealert($(this).text());/code. I am still at a lost why the other code didn't work.
Could you please share your app with a href="mailto:support@tiggzi.com" rel="nofollow"support@tiggzi.com/a?
Marina, it is shared, with comments in the appropriate areas of the Filtered page. Thanks.
Please note also that I am working on isolating the name through the text of the label and image so I can extract the story node from the DOM. Could you give me a clue as to extracting that information also? Thanks.
What is the app name?