Dynamic

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <link rel="stylesheet" href="css/master.css" media="screen" title="no title"> <link rel="stylesheet" href="css/forms.css" media="screen" title="no title"> </head> <style type="text/css"> * { margin: 0; padding: 0; } a { color: inherit; text-decoration: none; } body { background-color: rgb(102, 179, 255); } nav ul { width: 100%; text-align: center; color: white; font-family: sans-serif; font-weight: bold; } nav ul li:not(.pacman) { display: inline-block; margin: 0; padding: 15px; width: 18%; border-top: .5em solid white; transition: all .7s; -webkit-transition: all .7s; } nav ul li:not(.pacman):hover { background: white; color: rgb(102, 179, 255); border-top-left-radius: 10px; border-top-right-radius: 10px; } .active { border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: white; color: rgb(102, 179, 255); } section { background-color: white; width: 90%; margin: 0; padding: 0; border: 0; border-radius: 10px; } #infinity { width: 220px; height: 100px; position: relative; } #infinity:before,#infinity:after { content: ""; width: 60px; height: 60px; position: absolute; top: 0; left: 0; border: 20px solid white; -moz-border-radius: 50px 50px 0; border-radius: 50px 50px 0 50px; -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); } #infinity:after { left: auto; right: 0; -moz-border-radius: 50px 50px 50px 0; border-radius: 50px 50px 50px 0; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); } .Title { text-shadow: 0 0 10px black; font-size: 2em; text-align-last: center; } footer { width: 100%; height: 100px; } section { font-family: sans-serif; line-height: 5em; } p:not(.Title) { font-size: 1.5em; } input, select, textarea { border-radius: 100px; width: 75%; height: 50px; text-align: center; font-size: 1.5em; font-family: sans-serif; border: 1px solid; } input[type=file] { border: 0; } textarea { height: 500px; border-radius: 50px; } input[type=submit] { background-color: rgb(102, 179, 255); border: 0; -webkit-transition: all .4s; transition: all .4s; } input[type=submit]:hover { background-color: white; border: 1px solid; cursor: pointer; } .signin:hover { text-decoration: underline; } .displayed { display: block; } .notDisplayed { display: none; } </style> <body> <nav> <ul> <li class="pacman"><center><div id="infinity"></div><p class="Title">The Book-Store</p></center></div></li> <a href="main-admin.php"><li>HOME</li></a> <a href="add-product.php"><li>ADD PRODUCT</li></a> <a href="deliveries.php"><li>DELIVERIES</li></a> <a href="log-out.php"><li>LOG OUT</li></a> </ul> </nav> <center> <section> <h1>UPGRADE PRODUCTS OF THE STORE</h1> <form class="" action="upgrade-product-conection.php" method="post" enctype="multipart/form-data"> <p>Book:</p> <script type="text/javascript"> </script> <select class="bookTitle" id="booksList" onchange="selectBook()"> <option value=""></option> <option value="1">A clockwork orange</option> <option value="2">High Rise</option> <option value="3">The lord of the rings</option> <option value="4">To kill a mockingbird</option> <option value="5">Watchmen</option> </select> <div id="secondPart" class="notDisplayed"> <p>Edit:</p> <select class="edit" name="toBeEdited" onchange="editElement()" id="myElement"> <option value=""></option> <option value="Title">Title</option> <option value="Author">Author</option> <option value="Description">Description</option> <option value="Cover">Cover</option> <option value="Price">Price</option> <option value="Stock">Stock</option> </select> <textarea id="Description" name="Description" class="notDisplayed" rows="8" cols="40"></textarea> <input id="attribute" name="" class="notDisplayed"><br> <input type="hidden" id="theBook" name="book" value=""> <p id ="coverPreview" class="notDisplayed"></p> <input type="submit" name="name" value="UPDATE "> </div> <script> function selectBook() { var Title = document.getElementById("booksList").value; if(Title != "") { document.getElementById("secondPart").className = "displayed"; document.getElementById('theBook').value = title[Title]; } else { document.getElementById("secondPart").className = "notDisplayed"; } } function editElement() { var x = document.getElementById("myElement").value; var value = document.getElementById('booksList').value; switch (x) { case "Title": document.getElementById("attribute").type = "text"; document.getElementById("attribute").name = "titleChange"; document.getElementById('attribute').className="displayed"; document.getElementById('coverPreview').className = "notDisplayed"; document.getElementById('Description').className = "notDisplayed"; break; case "Author": document.getElementById("attribute").type = "text"; document.getElementById("attribute").name = "author"; document.getElementById('attribute').className="displayed"; document.getElementById('coverPreview').className = "notDisplayed"; document.getElementById('Description').className = "notDisplayed"; break; case "Description": document.getElementById('coverPreview').className = "notDisplayed"; document.getElementById('Description').className = "displayed"; document.getElementById('Description').name = "description"; document.getElementById('attribute').className="notDisplayed"; break; case "Cover": document.getElementById("attribute").name = "cover"; var source = document.getElementById('booksList').value; document.getElementById("attribute").type = "file"; document.getElementById('attribute').className="displayed"; document.getElementById('coverPreview').className = "displayed"; document.getElementById('Description').className = "notDisplayed"; break; case "Price": document.getElementById("attribute").type = "number"; document.getElementById("attribute").name = "price"; document.getElementById('attribute').className="displayed"; document.getElementById('coverPreview').className = "notDisplayed"; document.getElementById('Description').className = "notDisplayed"; break; case "Stock": document.getElementById("attribute").type = "number"; document.getElementById("attribute").name = "stock"; document.getElementById('Description').className = "notDisplayed"; document.getElementById('attribute').className="displayed"; document.getElementById('coverPreview').className = "notDisplayed"; break; default: document.getElementById('attribute').className="notDisplayed"; document.getElementById("attribute").name = ""; document.getElementById('coverPreview').className = "notDisplayed"; document.getElementById('Description').className = "notDisplayed"; break; } } </script> </form> </section> <footer> copyright </footer> </center> </body> </html>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.