Jump to content

Checking the condition and performing a task.


Karneet
 Share

Recommended Posts

Hello everyone, I am new to HTML and just wanted to help my girl friend build her website. She wants to make it such that the user needs to answer a set of questions that has a condition and depending on each reply the result provided would be a alert box stating the data. for example she wants to check the age and marital status. if the age is less than 25 and marital status is single : one option should be displayed similarly if the age is less than 25 but the marital status is divorced another alert box should poop up. Can anyone please please help me with the base code in which i can check for the condition and call a function that does this. I can amend the code according to her need but i am struggling to determine the code.

Link to comment
Share on other sites

as in your other thread, you will have to at least supply some code, with specific questions related to which parts exactly you are having problems with.

 

also: refrain from double posting, this thread is almost exactly like your other one.

Edited by thescientist
Link to comment
Share on other sites

you could put a set of radio buttons, each answer on the radio buttons should launch a function (use onclick functions). And in the script, create all the functions, and every function should change a variable.

Not sure if I was clear enough but if you have ANY piece of code that you started, I could totally help you

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...