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

90
Vistas
A CGI program replaced a variable ^. This "OldSearchWord" should be replaced via js with a modified OldSearchWord, the NewSearchWord

A Query with an OldSearchWord UNITY SOFTWARE leads to a new page where a variable ^ is replaced with the OldSearchWord UNITY SOFTWARE. This works fine.

After the result page is loaded, the OldSearchWord UNITY SOFTWARE should be modified in this way: The white space character should be replaced with a _. The result, the NewSearchWord, should look like UNITY_SOFTWARE.

The Problem: No NewSearchWord is created and looks like the OldSearchWord.

How can the OldSearchWord UNITY SOFTWARE changed after the page has loaded into the NewSearchWord UNITY_SOFTWARE?

My code:

<body  onload="myFunction()">
New search word:  <span id="NewSearchWord"></span>
<script>
let OldSearchWord;
let NewSearchWord;
OldSearchWord = "^";
</script>
<script>
function myFunction() 
{   
NewSearchWord = ( OldSearchWord.replace(/\s+/, '_') );
document.getElementById("NewSearchWord").innerHTML = NewSearchWord;
window.alert(NewSearchWord);
}
</script>
</body>
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