P
Paulo
Hello all
I am trying to fill in a RTF control dynamically. But I loose the format...
Here are the basic steps I do:
* I create a new form in design mode.
* I drag and drop a RTF control on the form
* I save the form
Next:
* I open it to fill it
I fill the RTF control with text, newlines, strong, italic....
* I save the file under "Form2.xml" and close the file.
I then reopen the Form in Design mode, add the "Form2.xml" as a resource
file and add the following code to the onload event:
var AuditDOM = new ActiveXObject("Msxml2.DOMDocument.5.0");
AuditDOM.async = true;
AuditDOM.validateOnParse = false;
AuditDOM.load("Form2.xml");
XDocument.DOM.documentElement.childNodes.item(1).text =
AuditDOM.documentElement.childNodes.item(0).text;
Basically, I'm trying to take the value that the user entered in Form2 and
use that as a default value for the new form.
This works but I loose the formating. I tried with nodeValue but I get a
type mismatch. But when debugging I see that both nodes have the Element type.
By the way, I don't understand why the indexes aren't the same...
item(0) and item(1)...
Could someone please explain?
Thanks
I am trying to fill in a RTF control dynamically. But I loose the format...
Here are the basic steps I do:
* I create a new form in design mode.
* I drag and drop a RTF control on the form
* I save the form
Next:
* I open it to fill it
I fill the RTF control with text, newlines, strong, italic....
* I save the file under "Form2.xml" and close the file.
I then reopen the Form in Design mode, add the "Form2.xml" as a resource
file and add the following code to the onload event:
var AuditDOM = new ActiveXObject("Msxml2.DOMDocument.5.0");
AuditDOM.async = true;
AuditDOM.validateOnParse = false;
AuditDOM.load("Form2.xml");
XDocument.DOM.documentElement.childNodes.item(1).text =
AuditDOM.documentElement.childNodes.item(0).text;
Basically, I'm trying to take the value that the user entered in Form2 and
use that as a default value for the new form.
This works but I loose the formating. I tried with nodeValue but I get a
type mismatch. But when debugging I see that both nodes have the Element type.
By the way, I don't understand why the indexes aren't the same...
item(0) and item(1)...
Could someone please explain?
Thanks