I have used a quite stupy idea.
Load the script with XMLHttpRequest and then eval().

var objHTTP, str;
objHTTP = new XMLHttpRequest();
objHTTP.open("POST",url,false);
objHTTP.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
objHTTP.send(post);
str=objHTTP.responseText;
eval(str);

Best regards, gwen

Kok Hoor wrote:

Hi all,

    I am using XUL remotely (via HTTP), and am trying to
include javascripts dynamically. I am not able to use the
"@mozilla.org/moz/jssubscript-loader;1" object, because
the call to
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
fails.

    Is there any other way to include scripts, especially without
the nasty prompts? All the scripts resides on the same webserver
in the same folder, so security isn't much of a problem.

    I tried created a script DOM element and inserting it to my
XUL form, but the script don't seem to get loaded.

Any hints will be appreciated. Thanks in advance.

Regards,
   Kok Hoor



_______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to