Hey guys..
I was curious if it's possible to execute javascript by adding <script> nodes into the head node the same way that <link> nodes are added for CSS styles. I've created a method that does it for me locally, but the script in question doesn't seem to be executing... is there something special needed to make javascript work in this document? Here's my snippet:
public static void addScriptNodeToHead (VpePageContext pageContext, nsIDOMDocument visualDocument, String scriptSrc) {
nsIDOMNode headNode = pageContext.getVisualBuilder().getHeadNode();
nsIDOMElement scriptNode = visualDocument.createElement("script");
scriptNode.setAttribute("src", scriptSrc);
scriptNode.setAttribute("type", "text/javascript");
headNode.appendChild(scriptNode);
}
_______________________________________________