Question
Using javascript, im trying to have one or two different functions check the status of two radio buttions and return a form, which is hidden.
Using javascript, im trying to have one or two different functions check the status of two radio buttions and return a form, which is hidden. The Gform or UGform have input for letter grades. How can I change the letter grades to numeric values for calculations. i.e. A or a = 4.0, B or b = 3.0 etc.
Code:
function validate_Name_Status_Form() { var x = document.forms["Name_Status_Form"]["fname"].value; var y = document.forms["Name_Status_Form"]["lname"].value;
//check radio button value var UG = document.forms["Name_Status_Form"]["UG"].checked; var G = document.forms["Name_Status_Form"]["G"].checked;
//all fields are fill up or not if (x == "") { //First name empty alert("First Name must be completed."); return false; } else if (y == "") { // Last name empty alert("Last Name must be completed."); return false; } else if (UG == "" && G == "") { //radio button is not checked alert("Select Undergraduate or Graduate."); return validate_Status_Form(); } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started