0% found this document useful (0 votes)
7 views3 pages

Tablereservation

The document contains a form for reserving a table at a restaurant called PJfood. The form requests the user's name, email, date, time, and number of people for the reservation. It includes validation to check that required fields are completed before submitting. It also displays the restaurant's hours of operation.

Uploaded by

jagdipkaur852
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Tablereservation

The document contains a form for reserving a table at a restaurant called PJfood. The form requests the user's name, email, date, time, and number of people for the reservation. It includes validation to check that required fields are completed before submitting. It also displays the restaurant's hours of operation.

Uploaded by

jagdipkaur852
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

<!

DOCTYPE html>
<html lang="en">
<head>
<title>Table Reservation page</title>
<link rel="stylesheet" href="tablereserved.css">
<script>

function validateForm()
{
let a = document.forms["myform"]["name"].value;

if (a == "")
{
alert("Please enter your Name");
return false;
}
else if(a.length>30)
{
alert("Input not valid");
return false;

let b = document.forms["myform"]["email"].value;
if (b == "")
{
alert("Please enter your Email");
return false;
}
let c = document.forms["myform"]["date"].value;
if (c == "")
{
alert("Please enter date");
return false;
}
let d = document.forms["myform"]["time"].value;
if (d == "")
{
alert("Please enter date");
return false;
}
let e = document.forms["myform"]["select"].value;
if (e == "")
{
alert("Please select no. of persons");
return false;
}
}
</script>
</head>
<body>
<div class="header">

<div class="container">
<div class="logoset">
<a href="projectmajor123.html">PJfood</a>
</div>
<nav>
<a href="projectmajor123.html">HOME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>

<a href="menuofproject.html">MENU&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>

<a href="tablereserver.html">RESERVE
TABLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>

<a href="aboutus.html">ABOUT US&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>

<a href="contactus.html">CONTACT US&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>


</nav>
</div>
</div>
<div class="container1">
<div class="container-time">
<h2 class="heading">Time Open</h2><br>
<h5 class="heading days">Monday-Friday</h5><br>
<p>7am - 11am (breakfast)</p>
<p>12pm - 4pm (lunch)</p>
<p>6pm - 11pm (dinner)</p>
<h5 class="heading days">Saturday & Sunday</h5>
<p>9am - 12pm (breakfast)</p>
<p>1pm - 4pm (lunch)</p>
<p>6pm - 10pm (dinner)</p>
<hr>
<h4 class="heading-phone">Call us: 9872100037</h4>
</div>
<div class="container-form">
<form action="" name="myform" onsubmit="return validateForm()"
method="post">
<h2 class="heading2">RESERVATION ONLINE</h2>
<div class="form-field">
<p>Your Name:</p>
<input type="text" placeholder="Your Name" name="name" >
</div>
<div class="form-field">
<p>Your Email:</p>
<input type="text" placeholder="Your email" name="email">
</div>
<div class="form-field">
<p>Date</p>
<input type="date" name="date" >
</div>
<div class="form-field">
<p>Time</p>
<input type="time" name="time">
</div>
<div class="form-field">
<p>No. of people</p>
<select name="select" id="#">
<option value="1">1 person</option>
<option value="2">2 persons</option>
<option value="3">3 persons</option>
<option value="4">4 persons</option>
<option value="5">5 persons</option>
<option value="6">6 persons</option>
<option value="7">7 persons</option>
</select>
</div>
<div class="b1">
<button class="btn" value="submit">Submit</button>
</div>
</form>
</div>
</div>
<!-- <div class="footer">
<div class="container">visit again</div>
</div>
</div> -->

</body>
</html>

You might also like