Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello. I am having some trouble with my Javascript code. I am trying to make the validate function run two other functions then if they

Hello. I am having some trouble with my Javascript code. I am trying to make the validate function run two other functions then if they both equal true to show a pop up window then submit the form. If either equals false it should not submit the form. I somehow managed to get the code to work earlier, however I started changing it around and now it has stopped working and I cant figure out how to get it to work again. The first section works, however I am having trouble with the else section.

function validate() { checkName(); checkPassword(); if (checkName() && checkPassword()) { window.alert("Submitted"); return true; } else { return false; } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Is there an optimal solution to a GP or MOLP problem? Explain.

Answered: 1 week ago

Question

4. Describe the role of narratives in constructing history.

Answered: 1 week ago

Question

1. Identify six different types of history.

Answered: 1 week ago