For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 7 replies, 2 voices, and was last updated 13 years, 1 month ago by
hardsofft.
-
AuthorPosts
-
hardsofftMemberMoved by support-octavio from iOS & Android Apps – App Center Builder Help forum
Hi, i need help inorder to finish my app. My app has a 2 screens and each screen will have a menu of 2 items(Menu of Screen 1 : item 1 , item 2 and Menu of Screen 2 : item 3, item 4). For both of the screens there will be 2 buttons YES and NO. Now my aim is to give the list of item in the new screen as selected by the user (Example 1 : if user select YES in Screen 1 and Screen 2 then i need to get the ouput as item 1, Example 2 : if user select YES in Screen 1 and NO in Screen 2 then i need to get the ouput as item 2).
Any Help would be greatly appreciated.July 16, 2012 at 11:32 am #328239
support-octavioMemberHi hardsofft,
I don’t clearly understand what is that you’re trying to achieve. Could you provide a few screenshots and describe a little more the details of the app behavior?
July 16, 2012 at 5:52 pm #328256
hardsofftMemberHi Octavio, thanks for the reply and sorry for making you confused. I attached my screen shots as per reply. Octavio my app is completely dependent on user selection.what i was trying to say is…As you can observe my screen shots you can get a clear picture of what i was last posted. To make it clear
If user press both YES in Screen1 and Screen2 then i should get my answer in the final Screen(My Screen3) as APPLE
If user press YES in Screen1 and NO in Screen2 then i should get my answer in the final Screen(My Screen3) as BANANA
If user press NO in Screen 1 and YES in Screen2 then i should get my answer in the final Screen(My Screen 3) as MANGO
If user press both NO in Screen 1 and Screen2 then i should get my answer in the final Screen(My Screen 3) as ORANGEHope you understand Octavio and waiting for your reply
Attachments:
You must be logged in to view attached files.July 16, 2012 at 7:34 pm #328258
support-octavioMemberHi hardsofft,
It is clearer. I’ve drafted a function but isn’t ready yet. Will follow up tomorrow with it. One aditional question: it doesn’t matter if any of the listitems is selected, right?
July 17, 2012 at 2:25 pm #328274
hardsofftMemberyes u r right Octavio.
July 20, 2012 at 12:35 pm #328372
hardsofftMemberhi Octavio, i am eagerly waiting for ur reply.
July 20, 2012 at 7:06 pm #328379
support-octavioMemberHi hardsofft,
You can use a simiar function like next one:
var previousANS; function gotoScreen(screen, answer){ if(screen==1){ phoneui.gotoPage("m1-screen2",'NONE'); //go to second page and change the list items text if(answer=="NO"){ $('#m1-screen2-').html("MANGO"); $('#m1-screen2-2').html("ORANGE"); }//if else if(answer=="YES"){ $('#m1-screen2-').html("APPLE"); $('#m1-screen2-2').html("BANANA"); }//else if previousANS = answer; }///if screen == 1 else if(screen==2){ phoneui.gotoPage("m1-screen3",'NONE'); //go to last page and set the text according the combination of responses var text =""; if(previousANS=="NO"&&answer=="NO") text = "ORANGE"; else if(previousANS=="NO"&&answer=="YES") text = "MANGO"; else if(previousANS=="YES"&&answer=="NO") text = "BANANA"; else if(previousANS=="YES"&&answer=="YES") text = "APPLE"; $('#m1-screen3-text1').text(text); }//if screen == 2 }//gotoScreen
Note that the previousANS var is outside of function but this var will be helpful as aux var.
Then the YES/NO Buttons in your UI should call this function. In first screen:
Yes button: gotoScreen(1,”YES”);
No button: gotoScreen(1,”NO”);And the same for second screen but change the 1 for a 2.
Let me know how it goes for you.July 21, 2012 at 4:52 am #328380
hardsofftMemberhi Octavio, thanq 4 the reply. i wil try and have a look on how it wil xecute.
-
AuthorPosts