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

234
Vistas
Error in Asp .net: Uncaught ReferenceError: HTMLButtonElement

I write this java script code for copy "txid" to the clipboard but i have this error: Uncaught ReferenceError: HTMLButtonElement this is my function:

function txidButtonCopy(txid) {
            
            var copyText = document.getElementById("txid");

            
            copyText.select();
            copyText.setSelectionRange(0, 99999); /* For mobile devices */

            
            navigator.clipboard.writeText(copyText.value);

            
            alert("txid");
        }

another part of code:

function txidButton(txid) {
            var disabled = 'disabled';

            if (txid!='') {
                disabled = '';
            }
            return '<button onclick="txidButtonCopy(' + txid + ')" ' + disabled + ' title="لینک تراکنش" class="btn btn-info" style="margin: 5px;"><i class="ion ion-ios-copy-outline"></i></button>';
        }
about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

You are grabbing the html button element by id when the element has no id. Give the element an id, or use document.getElementsByClassName.

function txidButton(txid) {
        var disabled = 'disabled';

        if (txid!='') {
            disabled = '';
        }
        return '<button id="txid" onclick="txidButtonCopy(' + txid + ')" ' + disabled + ' title="لینک تراکنش" class="btn btn-info" style="margin: 5px;"><i class="ion ion-ios-copy-outline"></i></button>';
    }
about 4 years ago · Santiago Gelvez Denunciar
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