Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Trying to debug my assignment but keep getting this error Uncaught TypeError: Cannot set property 'onclick' of null at window.onload (email_list.js:38) var $ = function(id)

Trying to debug my assignment but keep getting this error Uncaught TypeError: Cannot set property 'onclick' of null at window.onload (email_list.js:38) var $ = function(id) { return document.getElementById(id); }; var joinList = function() { var emailAddress1 = $("email_address1").value; var emailAddress2 = $("email_address2").value; var firstName = $("first_name").value; var errorMessage = ""; // validate the entries if (emailAddress1 == "") { errorMessage = "First email address entry required"; $("email_address1").focus(); } else if (emailAddress2 == "") { errorMessage = "Second email address entry required"; $("email_address2").focus(); } else if (emailAddress2 != emailAddress1) { errorMessage = "Email address entries must match"; $("email_address2").focus(); } else if (firstName == "") { errorMessage = "First name entry required"; $("first_name").focus(); } // submit the form if all entries are valid // otherwise, display an error message if (errorMessage = "") { $("email_form").submit(); } else { alert(errorMessage); } }; window.onload = function() { $("#join_List").click(join_List); $("email_address1").focus(); };

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

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

Can workers be trained in ethics? How? Defend your answer.

Answered: 1 week ago