Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

161
Vistas
Range Slider causes page to go blank when parts uncommeneted
function RangeSlider() {
    var ranger = document.getElementById("ranger");
    var output = document.getElementById("output");
    var cost = document.getElementById("cost");
    // output.value = ranger.value;
    // cost.value = output.value * 10;

    // ranger.oninput = function() {
    //     output.value = this.value
    //     cost.value = output.value * 10}
    return(
        <div class="rangecontainer">
            <p class="numerichours">Hours: <span ref={output}></span></p>
            <input type="range" min="1" max="100" value="10" class="range" ref={ranger}/>
            <p class="numerictext">Estimated Cost $: <span ref={cost}></span></p>
        </div>
    )
};

I am trying to make an image range slider like on W3 schools, but rather than html/css/js in an html doc like them, I was hoping to do it in a Javascript function in my React Website. When the lines above are uncommented, the whole page goes blank.The CSS works so the problem is just in the Javascript and HTML. Any suggestions would be appreciated :D

https://www.w3schools.com/howto/howto_js_rangeslider.asp

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda