Source language: Translate to:

Radio Button Action? Is this an option?

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Radio Button Action? Is this an option?

Postby laurieslegends » Wed Nov 11, 2009 12:59 am

Hi to all,

I am working on a project and am not sure if I am using the right object.

To explain it simply I have 4 pages.

Page 1 has question with radio button (unchecked) options.

The user will only only check one of several choices.

I have configured a next box that pops an alert, if a box isn't checked.

So they go through several pages picking one choice, (similar to a multiple choice quiz) like the example.

The difference is, I don't want an action of right or wrong or how many correct.

I want the radio option that is checked from each page to post to one text file on say page 5 with those choices selected all inputed into a text article to be printed out.

I have combed through the example files and all the references to radio buttons in the users manual. I can't figure out how to assign that object variable.

I am an amatuer when it comes to the coding, have the gui and navigation of the program pretty well understood.

Would greatly appreciate any help I could get with this.

Thanks in advance.

Sincerely,

Laurie
laurieslegends
 
Posts: 13
Joined: Tue Sep 29, 2009 11:22 pm

Postby smartmedia » Wed Nov 11, 2009 1:34 am

Hi Laurie,

This pub took me only 5 minutes to make it. I think will help you. If you have any questions don't hesitate to ask.

You can download the file from:
http://rapidshare.com/files/305376497/Questions.rar
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Thanks Smartmedia, that helps....

Postby laurieslegends » Wed Nov 11, 2009 1:55 am

Wow I appreciate the quick reply and I really appreciate the example.

I will probably have some more questions, but I am going to take what you just showed me and apply it to what I am doing, and see how much I can figure out.

I find the trial and error really helps me sink it in, but I will only allow myself to get frustrated for a certain length of time. :roll:

Thanks again,

Laurie
laurieslegends
 
Posts: 13
Joined: Tue Sep 29, 2009 11:22 pm

Any answer can be a right answer though!

Postby laurieslegends » Wed Nov 11, 2009 2:09 am

Like I said, thanks, your sample did show me how to create my results page and tells me what I thought, I need the "setvariable" command.

However, my questions are like this:

Choose one of the following,

a: red fruit,
b: green fruit,
c: yellow fruit.

and they must choose one and that one will be inputed into my results page at a point I determine, (like in the form letter example.) However, they must choose one, before going on.

I have this for my next box:
------------------------

If"[RadioGroup2]" ">" ""

GotoNextPage

Else

AlertBox "Whoops" "You forgot to select an ingredient from the fruits category. Try again."

EndIf

--------------------------

Can I double up on the conditions, and send the answer to the rtf results within the above command too?

Thanks again, I know other amatuers will probably benefit from my question, even if it seems so very primitive to the experts reading this. :oops:

Laurie
laurieslegends
 
Posts: 13
Joined: Tue Sep 29, 2009 11:22 pm

Postby smartmedia » Wed Nov 11, 2009 2:32 am

Hi..

if you want to check first if the user has answer the question, yes, that if will do the job. But you forgot to input inside the if the result. Make it like this.

This is for the first button
Code: Select all
If"[Answer1]" ">" ""
SetVar "[RightAnswers]" "[Answer1]"
GotoNextPage
Else
AlertBox "Whoops" "You forgot to select an ingredient from the fruits category. Try again."
EndIf


and this for the second "Next" button
Code: Select all
If"[Answer2]" ">" ""
SetVar "[RightAnswers]" "[RightAnswers][#13][Answer2]"
GotoNextPage
Else
AlertBox "Whoops" "You forgot to select an ingredient from the fruits category. Try again."
EndIf
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby smartmedia » Wed Nov 11, 2009 3:17 am

Hi..

Please check the new pub i have made. Gives you more options and may give you some new ideas..

http://rapidshare.com/files/305406637/Questions1.1.rar
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Radio button or checkbox?? and no correct answers....

Postby laurieslegends » Sat Nov 14, 2009 1:02 am

Hi,

I have been looking at your samples. I read the manual almost from cover to cover while riding the bus today, and I thought I might have figured it out.

I designed a simple sample app of what I am trying to do, (it gives the gist of it.)

It is like a quiz, but any choice they pick would be the correct choice and the one inserted on the results page.

I am trying to figure out if I need to make the continue button on the master page, or customize it on each individual page.

Would it be better to run it with radio buttons or check boxes. I haven't assigned any actions to either yet in this sample, I just want to get the general idea of what I am trying to do.

Thanks in advance,

Laurie

You can find the zipped sample here:

http://www.writeareviewsoftware.com/s38 ... button.zip
laurieslegends
 
Posts: 13
Joined: Tue Sep 29, 2009 11:22 pm

Postby smartmedia » Sat Nov 14, 2009 1:24 am

Hi Laurie,

I download and show your pub. I always say that a good application must be first of all, a good looking application, keep that in mind when you programming.
Check box mostly used when you have options and you like the user to adjust it. Also can be used in multi choice questions. Remember that multi choice has different approach than simple question answer. So before you start doing more, write in a paper what your app want to do, exactly. This way you have a clear idea. Then you can search the ways to do that. Neobook is very powerfull and you can do a lot in a very sort time..
In the example i gave you, all question and answers are hard-coded, that means that you can use is app once. So if you need to change - add or delete an answer you must do it using Neobook.
You can override that if you use Database to keep the questions and answers, or just simple Text files.
In both ways the code is a little more complex than example shows.
Thanks
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest

cron