You are not logged in.
Hi
I'm adding a JavaScript file to the Xinha document like this:
var jsSrc = editor._doc.createElement("script");
jsSrc.setAttribute("language", "javascript");
jsSrc.setAttribute("type", "text/javascript");
jsSrc.setAttribute("src", "myfile.js");
Which correctly adds this: <script language="javascript" src="expando.js" type="text/javascript"></script>
OK so far, but when I try to reload the document in FireFox I'm getting a Xinha "Your Document is not well formed" error. The problem seems to be the path to the script file, in particular the '.js' part.
Has anyone had the same problem and / or found a solution?
Thanks
Last edited by sjd (2007-02-05 13:35:58)
Offline
this might work:
jsSrc.setAttribute("src", _editor_url + "myfile.js");
assuming the js file is in the same folder as xinha
David G. Paul
[url]http://www.newearthonline.co.uk[/url]
Offline