Sei sulla pagina 1di 4

WEEK 1: Design the following static web pages required for an online book store web site .

1) HOME PAGE: The static home page must contain three frames .Top frame: Logo and the college name and links to Home page, Login page, Regist ration page,Catalogue page and Cart page (the description of these pages will be given below).Left frame: At least four links for navigation, which will display the catalogue of respective links. For e.g.: When you click the link CSE the catalogue for CSE Books should be displayed in the Rightframe.Right frame: The pages to the links in the left frame must be loaded here. Initially this page containsdescription o f the web site. HomePage.html <html> <head> <title> Online Book Store</title> <frameset rows="20%,*%" scrolling="no"> <frame name="tframe" src="Title.html"> <frameset cols=20%,80%"> <frame name="tframe" src="Links.html"> <frame name="rframe" src="Home.html"> </frameset> </frameset> </head> <body> </body> </html>

2) LOGIN PAGE:LoginPage.html <html> <head> <title> Online Book Store</title> </head> <body bgcolor="pink"> <center><h1>LOGIN</h1> <form action="account.html"> <table border="0"> <tr> <h3><td>Username:</td> <td><input type="text" value=""name="t1"></td></h3> </tr> <tr> <h3><td>Password:</td> <td><input type="password"name="p1"></td></h3> </tr> <tr> <td></td> <td><input type="submit" value="Sign In"> <input type="submit"value="Reset"></td> </tr> </table>

</form> </center> </body> </html>

WEEK 2: 3) CATOLOGUE PAGE: The catalogue page should contain the details of all the books available in the web site in a table.The details should contain the following:1. Snap shot of Cov er Page.2. Author Name.3. Publisher.4. Price.5. Add to cart button. Catologue.html <html> <head> <title>Online Book Store</title> </head> <body bgcolor="pink"> <h1>Books</h1> <ul type="square" compact> <li>C</li> <li>C++</li> <li>Java</li> <li>DBMS</li> <li>UNIX</li> <li>WT</li> </ul> </body> </html>

4) REGISTRATION PAGE: Create a registration form with the following fields1) Name (Text field)2) Password (password field)3) E-mail id (text field)4) Phone number (text field)5) Sex (ra dio button)6) Date of birth (3 select boxes)7) Languages known (check boxes Engl ish, Telugu, Hindi, Tamil)8) Address (text area) RegistrationPage.html <html> <head> <title> Online Book Store</title> </head> <body bgcolor="pink"> <center> <h1>REGISTRATION</h1> <table border="3"> <tr> <h3><td>Name:</td> <td><inputtype="text"></td> </tr> <tr> <td>Password:</td> <td><inputtype="password"></td> </tr> <tr> <td>Sex:</td>

<td><input type="radio" name="r1">Male <input type="radio" name="r1">Female</td> </tr> <tr> <td>Email ID:</td> <td><input type="text"></td> </tr> <tr> <td>Phone no:</td> <td><input type="text"></td> </tr> <tr> <td>Address:</td> <td> <textareaname="string"></textarea></td> </tr> <tr> <td><input type="submit" value="Sign In"> <input type="reset"value="Reset"></td> </tr> </table> </center> </body> </html>

WEEK 3:VALIDATION: Write JavaScript to validate the following fields of the above registration page.1. Name (Name sh ould contains alphabets and the length should not be less than 6 characters).2. Password (Password should not be less than 6 characters length).3. E-mail id (sh ould not contain any invalid and must follow the standard pattern name@domain.co m)4. Phone number (Phone number should contain 10 digits only). Note: You can al so validate the login page with these parameters. RegisterValidate.html <html> <head> <title> Online Book Store</title> <script language="javascript"> <!-function validate() { var uname=document.getElementById("name").value; var pass=document.getElementById("pwd").value; var emid=document.getElementById("eid").value; var phno=document.getElementById("pno").value; var date=document.getElementById("date").value; var month=document.getElementById("month").value; var var var var var year=document.getElementById("year").value; addr=document.getElementById("addr").value; emsg=""; uname_re=new RegExp("^[a-zA-Z]{4,}$"); pass_re=new RegExp("^[a-zA-Z0-9]{6,}$");

varemid_re=newRegExp("\b[a-zA-Z0-9._-]+@[a-zA-Z0-9]+\.[a-zA-Z]{2,6}\b"); var phno_re=new RegExp("^[0-9]{10}$"); varaddr_re=newRegExp("^[a-zA-Z0-9.,-/]$"); if(uname=="")emsg+="name cant be empt y\n"; else if(uname.match(uname_re)==null) emsg+="name must contain onlyalphabets\n"; if(pass=="") emsg+="password cant be empty\n"; else if(pass.match(pass_re)==null) emsg+="error in password\n"; if(emid=="") emsg+="email id cant be empty\n"; else if(emid.match(emid_re)==null) emsg+="enter valid email id\n"; if(phno=="") emsg+="phno cant be empty\n"; else if(phno.match(phno_re)==null) emsg+="enter valid phno\n";

Potrebbero piacerti anche