|
Greetings,
i have a question regarding the HtmlDocument class. Im building a small app that integrates the WebBrowser. At runtime i want to add applets to the source code.
Although i can add the applets, there is a small problem:
This is the code i want to generate in the Browser: <object style="position:absolute; top: 1px; left: 1px" codetype="application/java" classid="..." width="10" height="10"> <param name="code" value="..." /> <param name="codebase" value="..." /> </object> Unfortunally, i cant seem to be able to add any child elements to the object element... this is the code i am using:
| |
public static void AddNewEditor(HtmlDocument document, Point point)
{
HtmlElement element, param;
element = document.CreateElement("object");
element.SetAttribute("codetype", "application/java");
element.SetAttribute("classid", "...");
element.SetAttribute("id", "editor");
element.Style = "width=1; height=1; position:absolute; top: " + point.Y + "px; left: " + point.X + "px";
document.Body.AppendChild(element);
param = document.CreateElement("param");
param.SetAttribute("name", "code");
param.SetAttribute("value", "...");
element.AppendChild(param);
param = document.CreateElement("param");
param.SetAttribute("name", "codebase");
param.SetAttribute("value", "...");
element.AppendChild(param);
}
|
i cant seem to call the element.AppendChild(param);... but it should ve a valid child for object...
I tried all i could think of, as editing the inner html of the object tag, etc, but nothng seems to work... Any clue??
Thanks in advance  Caxaria
Caxaria |