Error in editor
In Mozilla heb ik echter geen problemen met het uitvoeren van het tinyMCe script maar explorer werkt alweer tegen. Ik krijg namelijk deze fout in explorer:
Ik heb al een hele tijd gezocht maar ik vind nog steeds niet waar het probleem zich voordoet. Hier is de code van mijn script:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<script language="javascript" type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
function doorgaan () {
var doen = confirm( "Do you want to add this news?" );
if (doen == true) {
if(document.form.title.value == "")
{
alert("Your forgot to fill in the news title!");
document.form.title.focus();
return false;
}
else if(document.form.category.value == "undefined")
{
alert("You forgot to fill in the news category");
document.form.category.focus();
return false;
}
else
{
document.form.submit();
return true;
alert("News has been added");
}
} else {
return false;
}
}
tinyMCE.init({
// General options
mode : "exact",
elements : "post",
theme : "advanced",
skin : "o2k7",
skin_variant : "silver",
width : "540",
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
//content_css : "css/news.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
});
</script>
<?php
if($_SESSION['userfunction'] == 'administrator')
{
include('config.php');
include('icones.php');
if(isset($_POST['addnews']))
{
$poster = $_SESSION['username'];
$title = $_POST['title'];
$allowedTags='<p><strong><em><u>';
$allowedTags.='<li><ol><ul><span><div><br><ins><del>';
/*$post = strip_tags(stripslashes($_POST['post']),$allowedTags);*/
$post = stripslashes( $_POST['post'] );
$post = mysql_real_escape_string($post);
$category = $_POST['category'];
$date = date('d-m-Y, l \a\t H:i');
$type = $_POST['type'];
if ($category == "undefined")
{
echo $ico_error;
echo "<br>You forgot to enter the Category field. Go <a href=\"javascript:history.back()\">back</a>";
}
else
{
$select = mysql_query("Select COUNT(id) AS posts from news")or die(mysql_error());
$rij = mysql_fetch_array($select);
$aantal = $rij['posts'] + 1;
mysql_query("INSERT INTO news (id, title, post, category, poster, date) values (NULL, '$title', '$post', '$category', '$poster', '$date')");
//mysql_query("INSERT INTO pages (id, newsID, newspost) values (NULL, '$aantal', '".$post."')")or die(mysql_error());
echo "<span class=\"goed\">".$ico_goed." News added succesfully.</span>";
}
}
else
{
?>
<div id="page">
<div class="infoNews">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?page=add_news" method="post" onSubmit="return doorgaan()" name="form">
<table width="350" cellspacing="5">
<tr>
<td>Title:</td>
<td><input type="text" name="title" maxlength="30" style="width: 345px"></td>
</tr>
<tr>
<td>Category:</td>
<td>
<select name="category" style="width: 345px">
<option value="undefined" selected="selected">- - Select Type - -</option>
<option value="clannews">Clan news</option>
<option value="scene">Scene news</option>
<option value="sitenews">Sitenews</option>
<option value="coverage">Coverage</option>
</select>
</td>
</tr>
<tr>
<td colspan="2"><textarea id="post" name="post" style="width: 500px; height: 250px;"></textarea></td>
</tr>
<tr>
<td>Submit</td>
<td><input type="submit" name="addnews" value="Add News" /></td>
</tr>
</table>
</form>
</div>
</div>
<?
}
}
else
{
exit();
}
?>
<script language="javascript" type="text/javascript">
function doorgaan () {
var doen = confirm( "Do you want to add this news?" );
if (doen == true) {
if(document.form.title.value == "")
{
alert("Your forgot to fill in the news title!");
document.form.title.focus();
return false;
}
else if(document.form.category.value == "undefined")
{
alert("You forgot to fill in the news category");
document.form.category.focus();
return false;
}
else
{
document.form.submit();
return true;
alert("News has been added");
}
} else {
return false;
}
}
tinyMCE.init({
// General options
mode : "exact",
elements : "post",
theme : "advanced",
skin : "o2k7",
skin_variant : "silver",
width : "540",
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
//content_css : "css/news.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
});
</script>
<?php
if($_SESSION['userfunction'] == 'administrator')
{
include('config.php');
include('icones.php');
if(isset($_POST['addnews']))
{
$poster = $_SESSION['username'];
$title = $_POST['title'];
$allowedTags='<p><strong><em><u>';
$allowedTags.='<li><ol><ul><span><div><br><ins><del>';
/*$post = strip_tags(stripslashes($_POST['post']),$allowedTags);*/
$post = stripslashes( $_POST['post'] );
$post = mysql_real_escape_string($post);
$category = $_POST['category'];
$date = date('d-m-Y, l \a\t H:i');
$type = $_POST['type'];
if ($category == "undefined")
{
echo $ico_error;
echo "<br>You forgot to enter the Category field. Go <a href=\"javascript:history.back()\">back</a>";
}
else
{
$select = mysql_query("Select COUNT(id) AS posts from news")or die(mysql_error());
$rij = mysql_fetch_array($select);
$aantal = $rij['posts'] + 1;
mysql_query("INSERT INTO news (id, title, post, category, poster, date) values (NULL, '$title', '$post', '$category', '$poster', '$date')");
//mysql_query("INSERT INTO pages (id, newsID, newspost) values (NULL, '$aantal', '".$post."')")or die(mysql_error());
echo "<span class=\"goed\">".$ico_goed." News added succesfully.</span>";
}
}
else
{
?>
<div id="page">
<div class="infoNews">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?page=add_news" method="post" onSubmit="return doorgaan()" name="form">
<table width="350" cellspacing="5">
<tr>
<td>Title:</td>
<td><input type="text" name="title" maxlength="30" style="width: 345px"></td>
</tr>
<tr>
<td>Category:</td>
<td>
<select name="category" style="width: 345px">
<option value="undefined" selected="selected">- - Select Type - -</option>
<option value="clannews">Clan news</option>
<option value="scene">Scene news</option>
<option value="sitenews">Sitenews</option>
<option value="coverage">Coverage</option>
</select>
</td>
</tr>
<tr>
<td colspan="2"><textarea id="post" name="post" style="width: 500px; height: 250px;"></textarea></td>
</tr>
<tr>
<td>Submit</td>
<td><input type="submit" name="addnews" value="Add News" /></td>
</tr>
</table>
</form>
</div>
</div>
<?
}
}
else
{
exit();
}
?>
Misschien weet iemand wel waar de fout zicht voordoet.
Met vriendelijke groet
Joachim
je hebt geen regel 150??
komma weg halen in de aanroep van je tiny op regel 58
media_external_list_url : "lists/media_list.js"
Gewijzigd op 01/01/1970 01:00:00 door Felix b