Descripción: Inicialización para poder enviar el formulario a un popup, e inicializar los distintos controles del mismo.
A continuación mostramos los apuntes asociados a este extra:
// Descripción para sindicación:
/*
[rss]Inicialización para poder enviar el formulario a un popup, e inicializar los distintos controles del mismo.[/rss]
*/
function habilitar_hora(no) {
tag("hh").disabled = no;
tag("mm").disabled = no;
tag("ss").disabled = no;
}
poner_evento(window, "load",
function() {
tag("svg_v").disabled = false;
tag("svg_f").disabled = true;
tag("svg_e").disabled = true;
tag("svg_p").disabled = true;
tag("svg_h").disabled = true;
tag("svg_m").disabled = true;
tag("svg_s").disabled = true;
tag("cambiar_hn").disabled = false;
tag("hh").disabled = true;
tag("mm").disabled = true;
tag("ss").disabled = true;
poner_evento(tag("reloj_svg"), "submit",
function() {
if (tag("svg_v").checked)
this.target = "_blank"
else
this.target = "reloj_svg";
for (i = 0, total = this.gmt.length; i < total; i++) {
if (this.gmt[i].checked) {
if (this.gmt[i].value == 0) {
ya = new Date();
this.hh.value = ya.getHours();
this.mm.value = ya.getMinutes();
this.ss.value = ya.getSeconds();
};
this.gmt[i].checked = false;
}
}
}
)
poner_evento(tag("cambiar_f"), "change",
function() {
tag("svg_f").disabled = !this.checked;
if (this.checked) tag("svg_f").focus();
}
)
poner_evento(tag("cambiar_e"), "change",
function() {
tag("svg_e").disabled = !this.checked;
if (this.checked) tag("svg_e").focus();
}
)
poner_evento(tag("cambiar_p"), "change",
function() {
tag("svg_p").disabled = !this.checked;
if (this.checked) tag("svg_p").focus();
}
)
poner_evento(tag("cambiar_h"), "change",
function() {
tag("svg_h").disabled = !this.checked;
if (this.checked) tag("svg_h").focus();
}
)
poner_evento(tag("cambiar_m"), "change",
function() {
tag("svg_m").disabled = !this.checked;
if (this.checked) tag("svg_m").focus();
}
)
poner_evento(tag("cambiar_s"), "change",
function() {
tag("svg_s").disabled = !this.checked;
if (this.checked) tag("svg_s").focus();
}
)
poner_evento(tag("cambiar_hs"), "change",
function() {
habilitar_hora(true);
}
)
poner_evento(tag("cambiar_hn"), "change",
function() {
habilitar_hora(true);
}
)
poner_evento(tag("cambiar_hd"), "change",
function() {
habilitar_hora(false);
}
)
}
);
Este código ha sido leído en 77 ocasiones.
Esta extra aún no tiene comentarios.
Valoración de esta página: (extra.script.Reloj_analógico_configurable_svg)
Listados: imágenes, categorías, etiquetas, extras | Anuarios: 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 | Otros enlaces: buscador