
José Encinas Ramos
Preguntatimer... el timer lo tengo en 2 paginas una que es donde ingreso el tiempo y la otra en donde se muestra..... pero no logro hacer que arranque el tiempo cuando le doy start.... no se si me explique bien.

José Encinas Ramos
este es mi codigo del timer:
function resetPage() {
stateSetting.classList.remov e("state-rotate"), document.getElementById("minutes").value = ""
}
function startBreak()
{
var e = document.getEl ementsByTagName("audio")[0];
e.play (), stateSetting = document.getEl ementById("background-setting"), stateSetting.classList.add ("state-rotate"), document.getElementById("minutes").value = "Enjoy your break", setTimeout(resetPage, 5e3)
}
function tick()
{
var e = document.getEl ementById("time-display"),
t = Math.floor (secondsRemaining / 60),
n = secondsRemaining - 60 * t;
10 > t && (t = "0" + t), 10 > n && (n = "0" + n);
var a = t + ":" + n;
e.inner HTML = a, 0 === secondsRemaining && (clearInterval(timerInterval), startBreak()), secondsRemaining--
}
function startTimer()
{
var e = document.getElementById("minutes").value ;
return secondsRemaining = 60 * e, 0 > secondsRemaining || isNaN(e) || "" === e ? (document.getElementById("minutes").value = "", document.getElementById("time-display").inner HTML = "00:00", void clearInterval(timerInterval)) : (clearInterval(timerInterval), void(timerInterval = setInterval(tick, 1e3)))
}
function pauseTimer()
{
secondsRemaining > 0 && (paused === !1 ? (paused = !0, this.value = "Resume", clearInterval(timerInterval)) : (paused = !1, this.value = "Pause", timerInterval = setInterval(tick, 1e3)))
}
function resetTimer()
{
clearInterval(timerInterval), document.getElementById("minutes").value = "", document.getElementById("time-display").inner HTML = "00:00"
}
var secondsRemaining, timerInterval, stateSetting, paused = !1;
window.onloa d = function()
{
var e = document.getEl ementById("start");
e.addEv entListener("click", startTimer);
var t = document.getEl ementById("stop");
t.addEv entListener("click", pauseTimer);
var n = document.getEl ementById("reset");
n.addEv entListener("click", resetTimer)
}
};
============================================================
este es el index
=============================================
<!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
<title>Timer container</title>
<LINK REL=StyleSheet HREF="programar-tiempo.css ">
<script type="text/javascript" SRC="tiempo.js ">
</SCRIPT>
</head>
<body>
<form>
<div class="timer-container" align="center">
<h1 id="time-display" class="timer-display">00:00</h1>
</div>
<div class="box" class="timer-container">
<div id="header">
<div id="cont-lock"><i class="material-icons lock">Ceuno</i></div>
<div id="bottom-head"><h1>Tiempo</h1></div>
<audio>
<source src="http://dylanmacnab.github.io/focus\-timer/sounds/timer\-bell.mp 3"></source>
<source src="http://dylanmacnab.github.io/focus\-timer/sounds/timer\-bell.ogg "></source>
</audio>
</div>
<form>
<div class="group" class="timer-container">
<input class="inputMaterial" id="minutes" class="timer-input" name="minutes" autocomplete="off"required>
<label>¿cuanto tiempo decea?</label>
</div>
<div class="timer-controls">
<button id="start" class="timer-button timer-start"type="button" value="Start Timer">Start</button>
</div>
</form>
<div id="footer-box"><p class="footer-text">Ceuno Hermosillo</p></div>
</div>
<div id="container-floating">
<div id="container-a">
<div id="badge">
</div>
</div>
</div>
</form>
</body>
</html>

Ricardo Azpeitia P.
Podrías poner un ejemplo con código?