Jump to content

Cannot set property 'value' of null


ISIDORIO

Recommended Posts

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>

Link to comment
Share on other sites

  • 2 weeks later...

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

 


 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...