Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-02-05 13:35:15

sjd
New member
Registered: 2007-01-15
Posts: 3

Error writing <script> tag to the Xinha document in FireFox

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

#2 2007-02-05 14:33:34

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Error writing <script> tag to the Xinha document in FireFox

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

Board footer

Powered by FluxBB