You are not logged in.
Hi all
I have just installed xinha and tried it out for a site I am building. Everything is coming along nicely! Almost. I tried ie today and then strange things happens.
I am using a php/mysql file with a number is if/then/else sections to manage add/update/delete content to the database.
When I add new content it works in ie also. The textarea is empty in this case and the section is above the update form in the php file.
The update section works in firfox but not in ie. In firefox I get
Error: this._textArea has no properties
Source File: http://pathtothefile/htmlarea.js
Line: 113
in ie I get something like this
this._textArea is null or not an object
---
The strange thing I get this even if I remove the textare definition totally from the "update" part of the php file.
Does it make sense?
here are some code:
<script type="text/javascript">
_editor_url = "./xinha/"
_editor_lang = "sv";
</script>
<script type="text/javascript" src="./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()
{
xinha_plugins = xinha_plugins ? xinha_plugins :
[
'CharacterMap',
'ContextMenu',
'ListType',
'SuperClean',
'ExtendedFileManager',
'Linker'
];
if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;
xinha_editors = xinha_editors ? xinha_editors :
[
'content'
];
xinha_config = xinha_config ? xinha_config() : new HTMLArea.Config();
xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
HTMLArea.startEditors(xinha_editors);
}
window.onload = xinha_init;
</script>
the 'content' is the id of both my textareas (the final html page only ever contains one textarea at one time)
here are some basic code from the php file.
...snip...
<?php if (isset($_GET['new'])) {
?>
<div id="scrollbox">
<form name="form1" method="post" action="nyhet.php">
<table width="90%" border="0" cellspacing="2" cellpadding="0">
...snip...
<textarea name="content" id="content" cols="50" rows="15"></textarea>
...snip...
</form>
...snip...
...snip...
} elseif(isset($_GET['update'])) {
$result= mysql_query("SELECT * FROM news WHERE id =".$_GET['id']);
while($myrow = mysql_fetch_array($result)) {
$id = $myrow["id"];
$title = $myrow["title"];
$content = $myrow["content"];
$date = $myrow["date"];
$author = $myrow["author"];
}
?>
<div id="scrollbox">
<form name="form1" method="post" action="nyhet.php">
...snip...
<textarea name="content" id="content" cols="50" rows="15"> <?php echo stripslashes($content);?> </textarea>
...snip...
</form>
</div>
<script type="text/javascript">
Calendar.setup({
inputField : "date", // id of the input field
ifFormat : "%Y-%m-%d", // format of the input field
//showsTime : true, // will display a time selector
button : "f_trigger_b", // trigger for the calendar (button ID)
singleClick : true, // double-click mode
step : 1, // show all years in drop-down boxes (instead of every other year as default)
firstDay : 1
});
</script>
<?php
} elseif($_POST['addupdate']) {
...snip...
---------------------------------------------------------------------------------------------
Any ideas are VERY much welcomed!
rgds Ask2
Offline
Anyone? Please?
I tried to move the update part to a separate PHP file with another textarea ID. But no luck.
The only part of the form that is displayed are the ones that comes after the textarea?!
ANY ideas would be very helful!
Rgds Ask2
Offline
It would be easier to find a solution if we could have a look at the resulting HTML, as the php part is of no importance, except for this part:
<textarea name="content" id="content" cols="50" rows="15"> <?php echo htmlspecialchars(stripslashes($content));?> </textarea>
Offline