ISIDORIO Posted February 12, 2020 Share Posted February 12, 2020 look procedure TMainForm.UniBitBtn1Click(Sender: TObject); begin UniSession.AddJS('document.getElementById("txtReceptor").value="'+UniEdit1.Text+'";'); //transfer content end; procedure TMainForm.UniFormCreate(Sender: TObject); begin // UnihtmlFrame2.HTML.loadfromfile('index3.html'); //this is work UniURLFrame1.HTML.loadfromfile('index3.html'); //if i use uniURLFrame not ok, why??????? Cannot set property 'value' of null end; ************index3.html********************* <!DOCTYPE html> <html lang="pt-BR"> <head> <title>Test HTML</title> </head> <body> <form id="frmTeste"> <p><strong>Input Receptor:</strong> <input type="text" name="textReceptor" size=80 id="txtReceptor" value="" /> <form> </body> </html> Quote Link to comment Share on other sites More sharing options...
风吹小机机 Posted February 21, 2020 Share Posted February 21, 2020 Same question UniURLFrame1.HTML: <!--核心库--> <link rel=stylesheet href="uni-1.90.0.1514/codemirror-5.25/doc/docs.css"> <link rel="stylesheet" href="uni-1.90.0.1514/codemirror-5.25/lib/codemirror.css"> <script src="uni-1.90.0.1514/codemirror-5.25/lib/codemirror.js"></script> <!--支持主题--> <link rel="stylesheet" href="uni-1.90.0.1514/codemirror-5.25/theme/abcdef.css"> <!--选中行亮显--> <script src="uni-1.90.0.1514/codemirror-5.25/addon/selection/active-line.js"> </script> <!--匹配括号--> <script src="uni-1.90.0.1514/codemirror-5.25/addon/edit/matchbrackets.js"></script> <!--支持语言--> <script src="uni-1.90.0.1514/codemirror-5.25/mode/pascal/pascal.js"> </script><style type="text/css">.CodeMirror {border-top: 0px solid black; border-bottom: 0px solid black;}</style> <!--创建对象--> <div><textarea id="O109code" name="O109code">begin end.</textarea> </div> <!--执行脚本--> <script>var O109editor = CodeMirror.fromTextArea(document.getElementById("O109code"), { theme:"abcdef", styleActiveLine: true, lineNumbers: true, lineWrapping:true, foldGutter: true, tabSize:4, gutters:["CodeMirror-linenumbers", "CodeMirror-foldgutter"], fullScreen:true, matchBrackets:true, mode: "text/x-pascal"}); O109editor.setSize('100%', '100%'); </script> How to call O109editor. Getdoc(). SetValue in Delphi Quote Link to comment Share on other sites More sharing options...
风吹小机机 Posted February 21, 2020 Share Posted February 21, 2020 I solved the above problems UniSession.AddJS(UniURLFrame1.JSName + '.iframe.contentWindow.O109editor.getDoc().setValue(' + StrToJS(FLines.Text) + ');'); There's another problem How to send ajaxrequest in HTML script Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 21, 2020 Share Posted February 21, 2020 Hello, Can you please specify which edition of UniGUI are you using? If you are using a commercial edition, please adjust your forum email address first: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.