Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

308
Views
Usando form.submit () en el lado del cliente GAS para transferir datos a localhost

Estoy tratando de crear un navegador emergente en GAS. Lo que quiero hacer aquí es publicar algún valor en mi API local y obtener una respuesta. Mi código a continuación no funciona como pretendía y está atascado en la pantalla de la imagen. Api no recibe ninguna solicitud, lo que significa que la publicación no funciona correctamente. Cualquier consejo será apreciado.

 if (cell_tick == true) { var tick_row = cell_pos.getRow(); var date = new Date(); sheet.getRange(tick_row, date_column).setValue(date).setNumberFormat('yyyy/MM/dd H:mm:ss'); openTab() function openTab() { var js = "<script language='JavaScript'>\ function openWindow()\ {\ myWindow = window.open('about:blank','theWindow','width=400,height=400');\ }\ </script>\ <form method='POST' name='myForm' action='http://127.0.0.1:5000/' target='theWindow'>\ <input type='text'>\ <input type='button' onERASETHISClick='openWindow(); document.myForm.submit()' value='Open and after submit'>\ </form>;\ " var html = HtmlService.createHtmlOutput(js) //.setHeight(10) //.setWidth(100); SpreadsheetApp.getUi().showModalDialog(html, 'Now loading.'); } }

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Su formulario está en un iFrame, básicamente existe en Internet en algún servidor en algún lugar. No puede publicar en localhost porque esa dirección no es pública, es local para su enrutador. Una buena manera de comenzar es leer cómo el cliente (el formulario) y el servidor (la aplicación) pueden comunicarse entre sí aquí .

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!