Using TinyMCE - JS - Error: tinyMCE is not defined
So far I've created my file below which is an exact copy of their wiki documentation. I've also downloaded the tinymce zip file, extracted it and placed it where it should go in relation to this file:
<?php
require_once('../includes/variables.php');
?>
<html>
<head>
<title>TinyMCE Test</title>
<script language="javascript" type="text/javascript" src="../tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced"
});
</script>
</head>
<body>
<!-- form sends content to moxiecode's demo page -->
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
<textarea name="content" cols="50" rows="15">This is some content that will be editable with TinyMCE.</textarea>
<input type="submit" value="Save" />
</form>
</body>
</html>
The result is no TinyMCE buttons at all.
I've got the following errors from Firefox:
Error: tinyMCE is not defined
Source File: http://localhost/rspca/public_html/tinymce.php
Line: 8
error. I'm also getting:
Error: missing : after case label
Source File: http://localhost/rspca/tiny_mce/tiny_mce.js
Line: 1
My JS is not great so troubleshooting these probs is a bit difficult. I've checked my directories and they seem fine. Up one dir, tiny_mce tiny_mce.js. I've ran the firebug extension and all I found was the same errors that the error console brought up so wasn't much help.
It seems to have been able to find the file but not the object/class.
I've searched google for ages and all I can find is the same error, but for people using TinyMCE for Drupal or some other prebuilt cms. In fact the only properly documented instance of the same problem I found was my own post in their forums!
This is as simply as I can make the example yet it doesn't work. If anyone has a working implementation of TinyMCE please zip it and upload it for me, I'd very much appreciate it.
PS: Here is the tinymce download:
http://tinymce.moxiecode.com/download.php

