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

  Code to sum of all the elements of the array

Write some code that places the sum of all the elements of the array x into total. Declare any variables that you need.

  Do comments explain processing that is not obvious

When reviewing a program, these are the four criteria for style: Do identifiers logically describe use? Is indentation used correctly to illustrate the structure of the program?

  Write a program that will use the four sorting algorithm

Write a program that will use the four sorts (Selection sort, Heap Sort, Quicksort and Merge Sort). Each of the four sorts should be TIMED on three different lists of integers.

  Html/css

"Validating Your Work" Please respond to the following:  Describe attribute minimization. Explain what would happen if you tried to validate a page containing instances of attribute minimization. Propose a solution to this problem.

  Write program which translate letter grade into number grade

Write program which translates a letter grade into number grade. Letter grades are A, B, C, D, F, possibly followed by + or -.

  Write a main method to test your max method

Write a main() method to test your max method. It should input three values, call your max method, and then print the three values and returned max value as output, eg:

  Write a while and a do-while loop

Pick one or more examples from everyday life and write a WHILE and a DO-WHILE loop.

  Which functions perform assignment score to private member

Consider this class definition: class quiz { public: quiz( ); int f( ); int g( ) const; private: double score; }; Which functions can carry out an assignment score=1.0; to the private member variable score?

  Write program which instantiates objects of classes

Private data of Quadrilateral must be the x-y coordinate pairs for four end-points of the Quadrilateral. Write a program which instantiates objects of your classes and outputs each objects area (except Quadrilateral.

  Write a script in perl

Write separate Perl scripts for each of the given requirements. Mentioned input data files are attached with this posting. In each case command to run the script from the command line should look like:

  Unix or linux versus microsoft windows server

Programmability - address the benefits and disadvantages of using UNIX or Linux versus Microsoft Windows Server within the organization, then propose one of the products.

  Create project to compute checking account balance

Create a project to compute your checking account balance. Form: Include radio buttons to indicate the type of transaction: deposit, check, or service charge.

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