You are not logged in.
Pages: 1
Hi, all
I don't know why this code won't work. Any ideas?
Thanks in advance
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
_editor_url = "http://localhost/matrizdeconocimientos/js/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="http://localhost/matrizdeconocimientos/js/Xinha/htmlarea.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 ***************************************************************
* First, what are the plugins you will be using in the editors on this
* page. List all the plugins you will need, even if not all the editors
* will use all the plugins.
************************************************************************/
xinha_plugins = xinha_plugins ? xinha_plugins :
[
];
// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING
if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;
/** STEP 2 ***************************************************************
* Now, what are the names of the textareas you will be turning into
* editors?
************************************************************************/
xinha_editors = xinha_editors ? xinha_editors :
[
'edicion'
];
/** STEP 3 ***************************************************************
* We create a default configuration to be used by all the editors.
* If you wish to configure some of the editors differently this will be
* done in step 5.
*
* If you want to modify the default config you might do something like this.
*
* xinha_config = new HTMLArea.Config();
* xinha_config.width = '640px';
* xinha_config.height = '420px';
*
*************************************************************************/
xinha_config = xinha_config ? xinha_config() : new HTMLArea.Config();
/** STEP 4 ***************************************************************
* We first create editors for the textareas.
*
* You can do this in two ways, either
*
* xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
*
* if you want all the editor objects to use the same set of plugins, OR;
*
* xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config);
* xinha_editors['myTextArea'].registerPlugins(['Stylist','FullScreen']);
* xinha_editors['anotherOne'].registerPlugins(['CSS','SuperClean']);
*
* if you want to use a different set of plugins for one or more of the
* editors.
************************************************************************/
xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
/** STEP 5 ***************************************************************
* If you want to change the configuration variables of any of the
* editors, this is the place to do that, for example you might want to
* change the width and height of one of the editors, like this...
*
* xinha_editors.myTextArea.config.width = '640px';
* xinha_editors.myTextArea.config.height = '480px';
*
************************************************************************/
/** STEP 6 ***************************************************************
* Finally we "start" the editors, this turns the textareas into
* Xinha editors.
************************************************************************/
HTMLArea.startEditors(xinha_editors);
}
window.onload = xinha_init;
</script>
</head>
<body>
<form action="guardar_edicion.php" method="post">
<textarea id="edicion" cols="40" rows="10"><? echo ($contenido); ?></textarea>
<input type="hidden" name="bloque" value="<? echo($bloque); ?>">
<input type="submit" value="guardar">
</form>
</body>
</html>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Offline
Do you get the same error in both Firefox and IE?
Does the included exampe-file work for you?
Offline
I have not tested this code in IE, only in Firefox. I'll test it as soon as possible.
The included-file doesn't work for me.
It's very strange.
Offline
Weird the example file doesn't work either. Try in IE as well and see if it's the same problem there.
Does the example linked from the xinha-homepage work? I mean this example: http://xinha.gogo.co.nz/xinha-nightly/e … ample.html
Offline
Humm, here the full_example is working just fine with FF 1.0.7 win and 1.0.6 linux.
Can you give us the error message you obtain and the user agent you are using ? The full_example is known to be not working with YET with FF 1.5 beta 1. I think it is because of the way plugins are initialized, i suspect the full example trying to go too quick and then failing in FF1.5b1.
Is the full_example is working when you use no plugin at all ?
try to change your _editor_url from "http://localhost/matrizdeconocimientos/js/Xinha/" to
_editor_url = "/matrizdeconocimientos/js/Xinha/";
Offline
Thanks for all your responses.
I've tested the code with IE and don't work neither.
At the moment, I'm using the browser Mozilla Firefox 1.0.4. , the change of URL, propose by mokhet, don´t work neither.
Don't worry, that was only a test.
Thanks again.
Offline
Pages: 1