Commit 096592bd by willgonzz

Initial commit

parents
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EJERCICIO_001</title>
<style>
#emailpara{
display: none;
}
</style>
</head>
<body>
<form action="">
<fieldset>
<legend>Email subscriptions </legend>
<p id="Ross">
<label>
<input onclick="toggleEmail()" type="checkbox" name="subscribe" id="subscripe">
Yes! I would like to receive all of your free candy!
</input>
</label>
</p>
<p id="emailpara">
<label>
Email Address:
<input type="text" name="email" id="email">
</label>
</p>
</fieldset>
</form>
<script>
function toggleEmail() {
document.getElementsById("emailpara").style.display="visible";
}
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EJERCICIO_002</title>
</head>
<body>
<fieldset>
<legend>Billing Information</legend>
<p>
<label>
Postal Address:<br>
<input onclick=setHomeAddress() name="postaladdress" id="postaladdress"></input>
</label>
</p>
<p>
Home Address:<br>
<label>
<input " type="checkbox" name="homepostalcheck" id="homepostalcheck">
Same as above
</label>
<br>
<input name="homeaddress" id="homeaddress"></input>
</p>
</fieldset>
<script>
function setHomeAddress(){
document.querySelector('#postaladdress').addEventListener('change', (e)=>{
alert(e.target.value);
});
document.querySelector('#homeaddressdiv').addEventListener('click', ()=>{
if(document.querySelector('#homepostalcheck').checked){
document.querySelector('#homeaddress').disabled = true;
document.querySelector('#homeaddress').value = document.querySelector('#postaladdress').value;
}else{
document.querySelector('#homeaddress').disabled = false;
document.querySelector('#homeaddress').value = "";
}
});
}
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EJERCICIO_003</title>
<link href="css/error.css" rel="stylesheet"/>
<script src="js/check.js"></script>
</head>
<body>
<form action="mailto:me@fakeemail.com" onsubmit="return checkForm();">
<fieldset>
<legend>Personal details</legend>
<p>
<label>
Full name:
<input type="text" name="fullname" id="fullname">
</label>
</p>
<p class="errormsg" id="nameerrormsg" style="color: red;">Please enter your name above</p>
<p>
<label>
Street Address:
<input type="text" name="streetaddr" id="streetaddr">
</label>
</p>
<p class="errormsg" id="addrerrormsg" style="color: red;">
Please enter your streetaddress
</p>
</fieldset>
<input type="submit" value="Submit it!">
</form>
<script>
function checkForm(){
if(document.getElementById("fullname").value ==""){
alert("nameerrormsg");
document.getElementById("fullname").focus();
if(document.getElementById("streetaddr").value ==""){
alert("addrerrormsg");
document.getElementById("streetaddr").focus();
}
return false;
}
if(document.getElementById("streetaddr").value ==""){
alert("addrerrormsg");
document.getElementById("streetaddr").focus();
return false;
}
}
</script>
</body>
</html>
\ No newline at end of file
CREATE TABLE REGISTRO_INVENTORY(
REGISTRO_ID INTEGER PRIMERY KEY,
FECHA DATE,
FILM_ID INTEGER NOT NULL,
STORE_ID INTEGER NOT NULL,
CONSTRAINT FK_FILM_ID FOREIGN KEY(FILM_ID) REFERENCES FILM(FILM_ID),
CONSTRAINT FK_STORE_ID FOREIGN KEY(STORE_ID) REFERENCES STORE(STORE_ID)
);
CREATE OR REPLACE TRIGGER INSERTAR_INVENTORY
AFTER UPDATE ON INVENTORY
FOR EACH ROW
BEGIN
INSERT INTO REGISTRO_INVENTORY (REGISTRO_ID, FECHA, FILM_ID, STORE_ID) VALUES (DEFAULT, OLD.LAST_UPDATE, OLD.FILM_ID, old.STORE_ID);
END INSERTAR_INVENTORY;
/
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment