0

i am creating a program that will help user when they are doing survey during the survey they enter for example from 1 to 25 value in text box1 the text box 2 should show 1st Grad if user enter value from 25 to 50 in same text box should show 2st Grad also third from 50 to 75

3
Contributors
4
Replies
21
Views
2 Years
Discussion Span
Last Post by piers
0

brother i dont have full knowledge javascript, jquery there for i need for code to create a program like this

0

I canot give you the code unless you tell me if you can use jquery or not.

Its like asking me to translate a menu for you in a restaurant but not telling me into which language.

0

Hi Muhammad_63,

Seeing as you have not specified if you can use JQuery or not yet I will explain how I would approach this:

Create the form with the text boxes
create ids for each of the text boxes
In my code I would use if statements based on the value in the text box
The condition for the first if would be less and equal to 25 the second if would be between 25 and equal to 50 and the third if would be between 50 and equal to 75.

In the if statements I would update the value of the second textbox.

To help you some Javascript reading:
http://www.w3schools.com/jsref/prop_select_value.asp
http://www.w3schools.com/js/js_if_else.asp

Also some JQuery reading:
https://api.jquery.com/val/

Hope that helps

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.