View Full Version : Accordion for ExtJs2?

18 Feb 2009, 6:59 AM
Ive installed the Accordion and latest ExtJs. When I run the sample page, i get the following JS errors and no Accordion:

Error: sp is undefined
Source File: ../extjs/adapter/yui/ext-yui-adapter.js
Line: 1

Error: Ext.BorderLayout is not a constructor
Source File: ./accordion/accordion.js
Line: 118

Searching other forum posts indicate that the second is a ExtJs v1 -> 2 migration issue, but I've never used v1. Is the Accordion incompatible with the latest ExtJS release? Without a zip or tar of the source, its hard to tell what I've really got in the way of files. The Accordion page requires saving the files individually and there seems to be no difference in the version of the same page that offers the Ver.: 1.1-beta2 link.

My simple code that brings up the "sp is undefined" error is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Ext Accordion Howto</title>
<link rel="stylesheet" type="text/css" href="../extjs/resources/css/ext-all.css">
<link rel="stylesheet" type="text/css" href="./accordion.css">
<script type="text/javascript" src="../extjs/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="../extjs/adapter/yui/ext-yui-adapter.js"></script>
<script type="text/javascript" src="../extjs/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="accordion.css">
<script type="text/javascript" src="Ext.ux.InfoPanel.js"></script>
<script type="text/javascript" src="Ext.ux.Accordion.js"></script>
<div id="acc-ct" style="width:200px;height:300px;border:1px solid silver">
<div id="panel-1">
<div>My first panel</div>
<div class="text-content">My first panel content</div>
<div id="panel-2">
<div>My second panel</div>
<div class="text-content">My second panel content</div>
<script type="text/javascript" src="accordion.js"></script>