Jump to content
Larry Ullman's Book Forums

cnusinov

Members
  • Posts

    9
  • Joined

  • Last visited

cnusinov's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Ok, still having some issues (just sitting down again to work on this). I have the following code, which is successfully pulling back the JSON object with the data fields / rows from mysql. *****Begin Code***** $(document).ready(function(){ $(document).bind('deviceready', function(){ var output3 = $('#blog1'); $.ajax({ type: 'GET', url: 'http://xxxxx.com/aaa/blog.php', dataType: 'jsonp', jsonp: 'jsoncallback', timeout: 5000, success: function(data, status){ $.each(data, function(i,item){ var blog1 = '<b>Published:</b> '+item.date+' <br>' + '<b>Title: </B>' +item.title+ '<br>' + '<b>Summary: </B>' +item.summary+'<br>' + '<b>Post: </b>' +item.blog_text+'<br>'; output3.append(blog1);} ); }, error: function(){ output.text('We are sorry, the TPro blog can not be loaded at this time. Please check your network connection.'); } }); }); }); ****END CODE**** What I can not figure out is how to pull out a field (or multiple fields) within each JSON record, and then drop that return value (such as blog1 above) into a collapsible panel div in query mobile (building within phone gap). I know this is not a JavaScript question per se, but I hope someone can help! Is this type of script sampling in Larry's AJAX book? The end goal is to return the five most recent rows from mysql into 5 collapsible panels in the DOM. I am new to this (obviously) and learning by doing from all of you experts. Thank you for the help!
  2. I am going to give this a whirl at the office tomorrow. Thanks a million, I will let you know how it goes, but I get what you are showing in your code above. Craig
  3. Yes, does help, sorry, bit new to this and was tasked with a PhoneGap application for both iOS and Droid. I will do the search, and I kind of get it. I was looking for that guidance on mapping those object properties to the local storage variables. Thanks! Craig
  4. Hello Everyone - Anyone have a good tutorial / sample of the following type of functionality: I can load data from a MySQL query into a JSON object via an AJAX call. What I can not figure out is how to then move each data field into a separate variable within HTML5's local storage, so that I can use it for a quiz type application. I am using PhoneGap to deploy this type of application. Any pointers or links would be phenomenal and I thank you for your help. Craig
  5. Larry - just picked up this one as well, through Chapter 3 and your work / book is awesome, really great job. Thanks!
  6. Hi Forum - Not sure if this topic fits this forum, but does anyone have a good source or sample for an online quiz that uses PHP/MySQL. Rather than google and come up with 50 zillion hits that are dead or broken, I figured I would ask the experts here. Thanks in advance, loving this book! Craig
  7. Larry, thanks, ok, will use a better subject line, thanks a million. Craig
  8. Thanks Larry! Looking forward to the link, thanks again, have a nice day!
  9. Larry, Really informative book and helping me get some of my chops back from years ago. Quick question for you: on the PeachPit site where I registered my e-book purchase, you had an article entitled 'A Complete(-ish) Login System Using jQuery'. Are those files available for download somewhere? Maybe I've stared at the monitor a bit too long this weekend, but I can't seem to find a link for the files you reference in the article. Many thanks in advance, and again, awesome book. Thank you, Craig
×
×
  • Create New...