GASでポップアップブラウザを作りたいと思っています。
ローカルのapiにpostしレスポンスを得たいのですがうまくpostができず、写真の画面で止まってしまいます。
api側はrequestを受けている様子はないので、postがまず機能していないと考えられます。
どんなアドバイスでも頂けたら嬉しいです!
I'm trying to create a pop-up browswer in GAS. What I wanna do here is post some value to my local api and get response from it. My code below doesn't work as I meant to and it's stuck in the screen in the picture. Api doesn't get any request meaning post is not working successfully. Any advice will be appreciated.
GAS
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.'); } }
まだ回答がついていません
会員登録して回答してみよう