Page 1 of 1

How I pull data using REST API and show it in alert box using javascript ?

Posted: Tue Jul 17, 2012 5:28 pm
by Florin Dumitru

I user PARSE to make a list of data and I want when I click to one item of the list to pop up an alert box with other info about that data.


How I pull data using REST API and show it in alert box using javascript ?

Posted: Tue Jul 17, 2012 5:35 pm
by maxkatz

If you want to open the standard browser alert, simply read the data from the page when you open the alert. Or, on click, save the data into local storage and then read it in the alert or popup.


How I pull data using REST API and show it in alert box using javascript ?

Posted: Tue Jul 17, 2012 5:49 pm
by Florin Dumitru

I try ...and is not working. Please give me a solution.
The alert box is empty.


How I pull data using REST API and show it in alert box using javascript ?

Posted: Tue Jul 17, 2012 6:09 pm
by maxkatz

You need to show what you tried and what exactly doesn't work.


How I pull data using REST API and show it in alert box using javascript ?

Posted: Tue Jul 17, 2012 7:17 pm
by Florin Dumitru

var pop = Tiggr('details');
alert(pop.val());

where "details" is the label with text from REST API


How I pull data using REST API and show it in alert box using javascript ?

Posted: Tue Jul 17, 2012 7:55 pm
by maxkatz

If it's a label component, you need to use pop.text(). val() is for input components.

http://api.jquery.com/text/


How I pull data using REST API and show it in alert box using javascript ?

Posted: Wed Jul 18, 2012 1:53 pm
by Florin Dumitru

:) thanks