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

287
Vistas
Multiple IP addresses of a website, open one that works

Working on a search bar that links to the client's catalogue (located at a different URL). The catalogue website has two different IP addresses: local and external. If using on-premise Wi-Fi, the local IP address works but the external doesn't. I need to open whichever IP address is working for a client. It's a WordPress website where I have zero access to anything except their frontend so I'm pretty much stuck with JS.

As of now, I'm opening both links when someone clicks.

window.open(`IP_External?idx=ti&q=${document.getElementById('searchText').value}`, `_blank`);

window.open(`10.1.1.6/search?idx=ti&q=${document.getElementById('searchText').value}`, `_blank`);   

I want to check the external IP address. If it works or responds on time (say 5 seconds), that IP address should be used otherwise the local one. How do I do this? I don't mind using JQuery but have never used it before.

about 4 years ago · Santiago Gelvez
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