Create the external javascript file.

Assignment Help Programming Languages
Reference no: EM13947763

Modify Simple JavaScript with validation

lab5xx.htm

<html>
<head>
<script type="text/javascript">
<!--
function MyLoadFunction() {
alert("Welcome to my Lab 5!");
}
-->
</script>
</head>

<body background="background.png" onLoad="MyLoadFunction();">
<div align="center">
<h1>Name</h1>
<h2>Course</h2>
<h3>Lab</h3>
</div>
</body>
</html>

Step 1: Using a text or HTML editor modify your lab5xx.htm page (see above) and save it as lab6xx.htm.

Step 2: Add a link to an external JavaScript file called lab6xx.js

Step 3: Create the external JavaScript file. Ensure that all of your form fields have a unique name on the lab6xx.htm file.

Step 4: Verify on the submission of the form the following:
- Ensure that none of the fields are empty.
- Ensure that Name field does not contain numbers and special characters.
- Ensure that the email field contains a proper email address using a regular expression condition in an ?if?then? statement. Use the code below (HINT: copy and paste code into Notepad to strip it of all formatting values BEFORE pasting into your HTML editor):

if (/^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,3})+$/.test(YourForm.YourEmailField.value)){
return (true);
}else{
return(false);
}

Step 5: If the fields are empty return false to the browser and alert the user as to which fields are empty. If the email is incorrect, alert the user that they must correct the format of that particular field. However, if everything is correct you can return true to the browser and the form data will be sent to your professor?s email.

Step 6: Save the web page and the external script file in two different formats: First save them as text documents--as lab6xx.txt and lab6jsxx.txt. Second save them as lab6xx.htm and lab6xx.js.

Reference no: EM13947763

Questions Cloud

Interpretations that seem missing or even avoided : Gaps and absences - Can you think of kinds of evidence, arguments, or interpretations that seem missing or even avoided?
Discuss the traditional reasons for carrying inventory : Discuss the traditional reasons for carrying inventory. Explain how safety stock is used to deal with demand uncertainty.
What 95% confidence interval for variance of life expectancy : For a random sample of 23 Asian countries, the variance on life expectancy was 7.3 years. What is the 95% confidence interval for the variance of life expectancy in all of Asia?
General solution for the temperature distribution : Obtain the general solution for the temperature distribution in the tube. In a practical application a limit would be placed on the maximum temperature that is permissible at the insulated surface (r = r2). Specifying this limit as Ts,2, identify ap..
Create the external javascript file. : Using a text or HTML editor modify your lab5xx.htm page (see above) and save it as lab6xx.htm.
Enabled the creation of what government agency : Figure 1.3 listed a number of recommendations from a "White Paper." What was the name of the organization that published the paper and what was the title of the paper?
What approach does jit take to minimize total inventory cost : What is EDI, and what relationship does it have to continuous replenishment? What approach does JIT take to minimize total inventory costs?
How much joint cost should be allocated : How much of the $76,000 joint cost should be allocated to No. 2 Common? a. $77,000. b. $0. c. $76,000. d. $48,000. e.$17,267.
Describe concepts of object-oriented software development : Describe basic concepts of object-oriented software development.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd