Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 48

Ed Goodall
Fusion Technology
Profile
Posts: 422
Reg: Oct 01, 2011
Wiltshire, UK
12,320
09/07/14 09:17 AM (9 years ago)

Show screen using response from PHP

Hi My home screen is a Custom HTML screen. When a user types in a string and presses submit, the submit button queries a PHP script and when the response comes back, I want a screen to appear... how can I do this? What does the script have to return? I guess something like : "itemId":"12345678", "itemType":"JC_AlertView", "loadScreenWithItemId":"12345679" ? Thanks Ed
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
09/07/14 12:53 PM (9 years ago)
Look at any JSON data from any app.
 
sarahk
Code is Art
Profile
Posts: 159
Reg: Jul 16, 2014
Auckland
10,290
like
09/07/14 06:31 PM (9 years ago)
My understanding from Niraj is that your php will need to will need to return the results list and the hyperlinks will need to look like this: <a href="appName://screenName?var1=val1&var2=val2" target="_blank" rel="nofollow">appName://screenName?var1=val1&var2=val2</a> What I'm not sure about is how it manages to generate that screen "on the fly" - you may have to have reference to an existing screen that is able to be passed a parameter. How you read that parameter in the new screen is beyond me. I've asked about this but still getting my head around how it's done.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
09/07/14 10:25 PM (9 years ago)
Sarah is referencing the URL Scheme technique -- a way to have a link pull up another BT Screen. Use links in HTML pages, links in PDF files and links on Buttons to open up the specified Screen within a BuzzTouch app. This technique takes advantage of the iOS URL Scheme to register the BuzzTouch app with a custom URL. From any app on the device, a tap on the custom URL myApp://myScreenNickname will launch the app into the screen with that nickname. https://www.buzztouch.com/files/howtos/BuzzTouch%20URL%20Scheme%20with%20Xcode%205.pdf For Ed's case, he needs to learn loadScreenObject.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
09/07/14 10:34 PM (9 years ago)
Use this post to learn loadScreenObject. Read it up to the point where theBigCoyote and Kittsy go back and forth. Then ponder ... You will get it! Also, download Smug's PHP package, link is in that same post: https://www.buzztouch.com/forum/thread.php?tid=0AEFF1909A28E9AC27DD126 -- Niraj
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.