I'm doing a web page with different html documents. Since windows works for me, but with OS X no.
This is the method in which I have it written:
function guardarCookies() {
if ($("#Conditions").prop("checked") == false) {
alert("You must accept the terms of service and conditions.");
}
else if ($("#Password").val().localeCompare($("#Password_confirmation").val())) {
alert("The password and the confirmation of the password aren't the same.");
}
else if ($("#Gender option:selected").val().localeCompare("0") == 0) {
alert("You must choose a gender.");
}
else {
document.cookie = name + ":Name=" + document.getElementById("Name").value + ";";
document.cookie = name + ":LastName=" + document.getElementById("LastName").value + ";";
document.cookie = name + ":Email=" + document.getElementById("Email").value + ";";
document.cookie = name + ":Password=" + document.getElementById("Password").value + ";";
document.cookie = name + ":Password_confirmation=" + document.getElementById("Password_confirmation").value + ";";
document.cookie = name + ":dia=" + document.getElementById("dia").value + ";";
document.cookie = name + ":mes=" + document.getElementById("mes").value + ";";
document.cookie = name + ":ano=" + document.getElementById("ano").value + ";";
document.cookie = name + ":Gender=" + $("#Gender option:selected").val() + ";";
document.cookie = name + ":Ncard=" + document.getElementById("Ncard").value + ";";
document.cookie = name + ":mesCD=" + document.getElementById("mesCD").value + ";";
document.cookie = name + ":anoCD=" + document.getElementById("anoCD").value + ";";
document.cookie = name + ":codigo=" + document.getElementById("codigo").value + ";";
document.cookie = name + ":Publicidad=" + $("#Publicidad").prop("checked") + ";";
document.cookie = name + ":Imagen=" + document.getElementById("Imagen_subida").src + ";";
window.location.href = '../MainPage.html'
}
}
Code within the form
<div id="Name_sname" class="Inputs col-md-12">
<input class="input" type="text" id="Name" placeholder="First" required>
<input class="input" type="text" id="LastName" placeholder="Last" required>
<input id="bimg" onclick="clickButton()" type="image" src="Images/bimg.png" width="40" height="40">
<input id="fotocargada" type="file" accept="image/*" onchange="loadPicture()" class="formulario">
<img id="Imagen_subida" src="" style="width:40px;height:40px;">
</div>