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

162
Vistas
I need to find which part of the javascript is generating this input element

So im working on this feature when user can edit the element, (HIS ID) the page has firewalls so its private it requires password to enter just to let you all know, but the problem is at the javascript part i think theres something generating an auto save input button that i cannot identify on the coding it only displays from the source. explaining: theres one button that you can use to save the changes you made to the element (you can see it below at the input tag) then theres a button above it that i cannot see on the open code but it only displays at the souce and i don't know where it comes from) Please someone help me remove it, that would save me hours of work!

<!DOCTYPE html>

<script data-ad-client="ca-pub-7267901485160871" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

<link rel='icon' href='favicon.png' type='image/x-icon'/ >

  
<script type="text/javascript">
function saveEdits() {
  //get the editable element
  var editElem = document.getElementById("edit");
  //get the edited element content
  var userVersion = editElem.innerHTML;
  //save the content to local storage
  localStorage.userEdits = userVersion;
  //write a confirmation to the user
}

function checkEdits() {
  //find out if the user has previously saved edits
  if(localStorage.userEdits!=null)
    document.getElementById("edit").innerHTML = localStorage.userEdits;
}

</script>


<div class="row">
  <div class="column">
    <div class="card">
  <div class="container">
  <h1 style="color: red;">ID</h1>
  <div id="edit" contenteditable="true">
  <body onload="checkEdits()">
  <p contenteditable="true" class="price">2447597194</p>
</div>
  </div>
  <input type="button" class="w3-btn w3-black" value="Ruaj ndrysh" onclick="saveEdits()"/>
  <p></p> 
  </div>
    </div>
  </div>
</div>

<div id="update"> - Edit the text and click to save for next time</div>
  
  
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Well I think itsn't javaScript what is generating the input, only this line of code:

<div id="edit" contenteditable="true">

is what making the input editable.

and in saveEdits() function you are saving the edited info into the localStorage, tharefore you are keep seing it even after a reloading of the page...I think!

about 4 years ago · Juan Pablo Isaza 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