17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 824 Views |
-
Error in Ajax evaluator on line 973: syntax error var tree = $('sitetree');

20 August 2008 at 5:21pm
Hi There,
I have been working through the tutorial with a fresh install of ss and all the pages show up fine in the CMS but when i go to create a new page at all ArticlePage or just a plain page i get this error:
Error in Ajax evaluator on line 973: syntax error var tree = $('sitetree'); var newNode = tree.createTreeNode("16", "New ArticlePage", "ArticlePage"); node = tree.getTreeNodeByIdx(13); if(!node){ node = tree.getTreeNodeByIdx(0); } node.open(); node.appendTreeNode(newNode); newNode.selectTreeNode();
This is my php code in the ArticlePage.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" >
<head>
</head><?php
/**
* Defines the ArticlePage page type
*/
class ArticlePage extends Page {
static $db = array(
'Date' => 'Date',
'Author' => 'Text'
);
static $has_one = array(
);
}class ArticlePage_Controller extends Page_Controller {
function getCMSFields() {
$fields = parent::getCMSFields();$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
return $fields;
}}
?>
</body>
</html>I am newish to php and would not realise if i had the code in the wrong order.
Any help would be great as I would love to get this tutorial completed!
-
Re: Error in Ajax evaluator on line 973: syntax error var tree = $('sitetree');

20 August 2008 at 6:20pm
SIGH....
Ok so i took out the html code...
fixed. lol
| 824 Views | ||
|
Page:
1
|
Go to Top |

