You are not logged in.
Pages: 1
I've installed Xinah as well as the latest hotfix from January 14th. I'm trying to implement this in a .NET 2.0 web application.
I'm not sure what the problem is, as I can open up and see the 'ext_example.html' example file just fine.
I get an "Xinha is undefined" error at this point:
// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING
if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
My code looks like this:
<script type="text/javascript">
_editor_url = "/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
</script>
<script type="text/javascript" src="~/Administration/xinha/XinhaCore.js"></script>
<script type="text/javascript">
xinha_editors = null;
xinha_init = null;
xinha_config = null;
xinha_plugins = null;
// This contains the names of textareas we will make into Xinha editors
xinha_init = xinha_init ? xinha_init : function()
{
/** STEP 1 ***************************************************************
............................
}
</script>
Any ideas?
Thanks,
Suzanne
Offline
Seems XinhaCore.js is not loaded.
Is suppose this path is wrong
<script type="text/javascript" src="~/Administration/xinha/XinhaCore.js"></script>
as it doesn't correspond with this
_editor_url = "/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
Offline
Good call. I changed the following:
_editor_url = "/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
to
_editor_url = "~/Administration/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
But still no dice. Any other suggestions?
Thank you for your help,
Suzanne
Offline
Offline
Yep - XinhaCore.js is found.
My application that's using Xinha is in a folder called "Administration" (which is directly under the root folder). The "xinha" folder is also under the "Administration" folder, inline with my application.
So then, shouldn't this work?
<script type="text/javascript">
_editor_url = "/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
</script>
<script type="text/javascript" src="/xinha/XinhaCore.js"></script>
Thank you,
Suzanne
Offline
Let's say you have:
www.domain.com/administration/page.html
www.domain.com/administration/xinha/XinhaCore.js etc.
Then it would be
<script type="text/javascript">
_editor_url = "/administration/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
</script>
<script type="text/javascript" src="/administration/xinha/XinhaCore.js"></script>
Offline
Shoot ... I'm still getting the "Xinha is undefined" error.
I changed my code to this:
<script type="text/javascript">
_editor_url = "/Administration/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
</script>
<script type="text/javascript" src="/Administration/xinha/XinhaCore.js"></script>
Thank you again,
Suzanne
Offline
I've got access to FirefoxPortable (I'm not allowed to download Firefox onto my computer - so I just run the FirefoxPortable.exe from my jump drive).
I'm not doubting that there might be a problem with my paths; I just don't know what the problem is ....
Thank you,
Suzanne
Offline
The tilde on Unix based servers is used to represent the home directory of the currently logged in user - in the case of the browser this would be something like www, www-data, or maybe even wwwrun. In the case of javascript links it's usually used before the username since it can't navigate the directory structure, only what is publically available. Is it accessed as http://<your-webserver-url>.com/Administration/xinha/ or are there any other folders in between the domain and the Administration folder?
David G. Paul
[url]http://www.newearthonline.co.uk[/url]
Offline
Yes - access to our website is via http://<your-webserver-url>.com/Administration/xinha/. The Administration folder is a top-level folder.
Any ideas?
Thanks!
Suzanne
Offline
okay, here's a long shot, is XinhaCore.js accessible to the web?
Could you goto http://<you-webserver-url>.com/Administration/xinha/XinhaCore.js ? Hopefully you should be able to actually view the file, if not and it instead gives Permission denied or such like, then try and get the permissions changed for that file so it is executable by the web.
Also, have you tried it without the leading slash?
David G. Paul
[url]http://www.newearthonline.co.uk[/url]
Offline
Okay - I found the problem. I had to include the root folder in the path:
<script type="text/javascript">
_editor_url = "/NIGHTSDEV2/Administration/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
</script>
<script type="text/javascript" src="/NIGHTSDEV2/Administration/xinha/XinhaCore.js"></script>
But now, I've encountered another problem. Xinha isn't working correctly with AJAX. Should I start a new thread or just continue with this thread?
Thanks again,
Suzanne
Offline
Pages: 1