Question: **please add alert and form validation** make sure all the buttons work body{ background-color:#F8F8FF; } Join Us Fitness Power For a healthy living Home target=_top>

**please add alert and form validation**
make sure all the buttons work
body{
background-color:#F8F8FF;
}
Join Us

"Fitness Power"

For a healthy living

Home  
target="_top">Drinks
Color=black>Join Us

} #txtState,#txtZip{ width: 25px;;
}

Join Us

Step 1:Enter vour name, address, and phone number :

Name:
Address:
City:
State :
Zip:
Phone:
Email:

Step 2:Select the membership you want:

"Weekly"
"Monthly"
"Yearly"
"Quartly"

Select the type of exercise you want:

Cardio
walking
Aerobic
Yoga
Lifting
Cycling
Pilates
Trainer
function doSubmit()
{
var customer = document.Form.customer.value;
if (customer.length == 0)
{
alert("Please enter a customer name.");
return;
}
/* continue the rest of text boxes */
if (validateRadio() == false)
{
alert("Please select a membership.");
return;
}
alert("Your form has been submitted.");
return;
}
function validateRadio()
{
if (document.Form.sizes[0].checked) return true;
if (document.Form.sizes[1].checked) return true;
if (document.Form.sizes[2].checked) return true;
if (document.Form.sizes[3].checked) return true;
return false;
}
//function to select elements by id
function $(id) {
return document.getElementByld(id); }
//function to display order
function displayOrder()
var name=$("txtName").value;//getting name
var address=$("txtAddress").value;//getting ad
var city=$("txtCity").value;//getting city
var state=$('txtState").value;//getting State
var state=$('txtZip").value;//getting zip
var phone=$("txtPhone"').value;//getting phone
var email=$("txtEmail").value;//getting email
//getting membership
var membership=document.getElementsbyName(
//declaring variable to membership
var members;
//using for loop
for(var i=0;i
//checking which membership is selected
if(membership[i].checked==true) {
//if membership is selected then
members=membership[i].value+""; }
}
//getting exercise selected by user
var exercise=document.getElements by Name
//declaring variable to exercise
var exercise=" ";
//using for loop
for(var i=0;i
{
//checking which membership is selected
if(membership[i].checked==true)
{
//if exercise is selected then
exercise+=exercise[i].value+", ";
} }
var htmlString="";//declaring variable to store
htmlString+="Name : " +name+"
Address: "+address+"
;
htmlString+="City: " +city+"
State: "+state+"
;
htmlString+="Email: " +email+"
membership: "+members+"
;
htmlString+="exercise: " +exercise+"
";
//display details on the div
("exercise").innerHTML=htmlString; }
 **please add alert and form validation** make sure all the buttons
Home Drinks Join Us Join Us Step 1:Enter your name, address, and phone number: Name: Address: City: Phone: Email: State: Zip: Step 2:Select the membership you want: "Weekly" "Monthly" "Yearly" "Quartly" Select the type of exercise you want: Cardio o walking Aerobic Yoga Lifting Cycling Pilates Trainer Submit Order Clear Entries

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!