Question

The purpose of this assignment is to figure out the designing and development of HTML forms with CSS and interaction between
2. Use CSS to give an appropriate style and structure on the form. Different formstyle might be used 3. Add to countries into

I need html coding in notepad++ according to the requirments those are listed in the pictures.
The project submission Instructions: 1. Create a folder with a name as CourseName-Section-AS3-GroupName, and add the project
Student Registration Form Please fill in this form to register a student. First Name Enter First Name Last Name Last Name Ema
2. Use CSS to give an appropriate style and structure on the form. Different form style might be used 3. Add two countries in
0 0
Add a comment Improve this question Transcribed image text
Answer #1

html code:-

--------------------------------------------------------
form.html
--------------------------------------------------------

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Registration</title>
<link href="form.css" rel="stylesheet" type="text/css" />
</head>
<body onload="resetSelection()">

<h1>Student Registration Form</h1>
<p>Please fill in this form to register a student</p>

<div>
<form>
<label for="fname">First Name</label>
<input type="text" id="fname" name="firstname" placeholder="Your First name" required>

<label for="lname">Last Name</label>
<input type="text" id="lname" name="lastname" placeholder="Your last name" required>
<label for="lname">Email</label>
<input type="text" id="lname" name="lastname" placeholder="Email" required>
<label for="lname">Email Confirmation</label>
<input type="text" id="lname" name="lastname" placeholder="Email Confirmation" required>

<label for="country">Country</label>
<select id="countrySelect" size="1" onchange="makeSubmenu(this.value)" placeholder="Country" required>
<option value="" disabled selected>Country</option>
<option>India</option>
<option>USA</option>
</select>
<label for="city">City</label>
<select id="citySelect" size="1" disabled required>
<option value="" disabled selected>City</option>
<option></option>
</select>
<label for="course">Course List:</label>
<select id="course" required>
<option>ABCD</option>
<option>ASQW</option>
<option>XYZZ</option>
<option>QWER</option>
</select>
<br><br>
<button id="Add">Add Course</button>
<br>
<label for="list">Selected Course List:</label>
<select id="list" name="list" multiple required>

</select>
<button id="Remove">Remove Course</button>
<input type="submit" value="Registration">
</form>
</div>
<script src="form.js"></script>
</body>
</html>

CSS code:-

--------------------------------------------------------
form.css
--------------------------------------------------------

input[type=text], select , option {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
  
input[type=submit] {
width: 100%;
background-color: #382fbb;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
#Add, #Remove{
width: 20%;
background-color: #9e9abd;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer; }
label
{
font-weight: bold;
}
  
div {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
}

Javascript code:-

--------------------------------------------------------
form.js
--------------------------------------------------------

var countryBycity = {
India: ["Bhubaneswar","Puri","Cuttack", "Mumbai"],
USA: [,"New York","Chicago","Los Angeles","Houston"],
}
function makeSubmenu(value) {
if(value.length==0)
document.getElementById("citySelect").innerHTML = "<option></option>";
else {
document.getElementById("citySelect").disabled = false;
var citiesOptions = "";
for(cityId in countryBycity[value]) {
citiesOptions+="<option>"+countryBycity[value][cityId]+"</option>";
}
document.getElementById("citySelect").innerHTML = citiesOptions;
}
}

function resetSelection() {
document.getElementById("countrySelect").selectedIndex = 0;
document.getElementById("citySelect").selectedIndex = 0;
}
const btnAdd = document.getElementById('Add');
const btnRemove = document.getElementById('Remove');
const sb = document.getElementById('list');
const course = document.getElementById('course');

btnAdd.onclick = (e) => {
e.preventDefault();

  
// create a new option
const option = new Option(course.value, course.value);
// add it to the list
sb.add(option, undefined);
};

btnRemove.onclick = (e) => {
e.preventDefault();

// save the selected option
let selected = [];

for (let i = 0; i < sb.options.length; i++) {
selected[i] = sb.options[i].selected;
}

// remove all selected option
let index = sb.options.length;
while (index--) {
if (selected[index]) {
sb.remove(index);
}
}
};

Output:-

Add a comment
Know the answer?
Add Answer to:
I need html coding in notepad++ according to the requirments those are listed in the pictures....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • given below are the project description and their Html and css files i need javascript according to the project and other files!

    HTML------------------------------------------------------CSS---------------------------------------------------WEB230 - JavaScript 1 Assignment 7 - FormsSome of these tasks would be better done in HTML or CSS but do them in JavaScript to practice whatwe have learned.1. Select the form element and save it in a variable. From here we can access all of the form fields.2. When the page loads do the following:add the password value "monkey"select the favourite city "New York"clear the textarea3. Add an event handler to the "name" field to change the background color...

  • Consider the attached Registration form. Use jQuery to: 1) Change the "Search" link on the left...

    Consider the attached Registration form. Use jQuery to: 1) Change the "Search" link on the left to a button that when clicked, hide all the fields on the form and display the text "This is a search feature..." 2) Display "required" in every input field upon loading the page 3) When the user fills the form and clicks "Login", the values inputted should be displayed in the empty row (under Login) of the page. The display should be in the...

  • NEED HELP with HTML with Javascript embedding for form validation project below. I have my code...

    NEED HELP with HTML with Javascript embedding for form validation project below. I have my code below but I'm stuck with validation. If anyone can fix it, I'd really appreciate. ****************************************************************************** CODE: <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <title>Nice</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script> var textFromTextArea; function getWords(){ var text =...

  • Need help!!! I need two programs that use one common database.. One program using a Visual...

    Need help!!! I need two programs that use one common database.. One program using a Visual Basic windows form using textboxes for data input (first name, last name, phone, email) and it should save the info into an SQL database when a save button is clicked. Second program using a C# windows form that has a drop down menu with all the names that have been saved into the database, when one name is clicked all their information should pop...

  • given below are the project description and their Html and css files i need javascript according...

    given below are the project description and their Html and css files i need javascript according to the project and other files! WEB230 - JavaScript 1 Assignment 6b - Event Delegation Before starting, study the HTML and open it in a browser so that you understand the structure of the document. You will add functionality to perform several tasks in our shopping list app. Clicking the red "X" at the right of an item will delete that item. Clicking on...

  • Form Processing HTML One of the most ubiquitous uses of JavaScript is validating form data on...

    Form Processing HTML One of the most ubiquitous uses of JavaScript is validating form data on the client side before it is submitted to the server. It is done everywhere because it is fast and it gives you a great deal of flexibility in how you handle errors insofar as the GUI is concerned. Attached is an image of some code I wrote (so Blackboard can't mess it up). Some things to notice that will help you with the lab....

  • The purpose is to serve as a bridge between your existing knowledge of HTML/JS and the...

    The purpose is to serve as a bridge between your existing knowledge of HTML/JS and the server side programming. You are required to use Node.js, Express and EJS for this assignment.. Tasks: In this assignment, you are to develop a web application for an online store. The type of store that you design, and its inventory is left to your discretion. 1. HTML Static Content - Web Form • The front end must collect all the information needed to mail...

  • This is a website picture The html and css code is as follow And my problem is as follow use the php and mysql Northwind Customer Database Search List Records All Records CustomerName v CustomerName...

    This is a website picture The html and css code is as follow And my problem is as follow use the php and mysql Northwind Customer Database Search List Records All Records CustomerName v CustomerName ContactName Address City PostalCode Search O ASC DESC List All Records Insert Record Country List City CustomerName ContactName Address City PostalCode Country List City Find by IID Find Insert 1 <! DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN" "http:L 3-<head> 4 Kmeta http-equiv-"Content-Type" content-"text/html; charset-utf-8" />...

  • I need help writting a Javascript function that does the following its for a HTML/CSS Shopping...

    I need help writting a Javascript function that does the following its for a HTML/CSS Shopping Cart Page CODE This page contains a list of the selected products that includes an image, name, price, quantity, and cost) Because the process is implemented not as real, three products along with its image and price are displayed on the page. The product ID of each product is stored in a hidden textbox. The default amount of each product is 1 and the...

  • URGENT HELP NEEDED: JQuery. PLEASE POST SCREEN SHOTS Task 1: Downloading jQuery Right-click the link to...

    URGENT HELP NEEDED: JQuery. PLEASE POST SCREEN SHOTS Task 1: Downloading jQuery Right-click the link to download the uncompressed latest version of jQuery Copy the jQuery.x.x.x.js file in the folder and specified as source file. Task 2: Download and install HTML-Kit 1. Navigate to htmlkit.com. 2. Click Download HTML-Kit 292. After it downloads, launch HKSetup.exe. Choose Full installation (the default) Uncheck Yes, download and install HTML-Kit Tools Trial. 6. Click Next>Finish. Task 3: Creating a Simple jQuery Application Launch HTML-Kit....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT