I have a layout and my main menu is an accordion in the west region.
Each option has a html (a crud code with .js and .php files associated).
To load the html code of each option i did this:
function showPage(strTitle, url) {
if (currentUrl != url ) {
currentUrl = url;
$('#content')
.empty()
.panel('setTitle', strTitle)
.panel('refresh', url);
}
}
And the calling code is
<a href="javascript:void(0)"
onClick="showPage('Mantenimiento de Especialidades Medicas', './especialidad_medica/mant_especialidad_medica.php')">Especialidad Medica</a><br/>
Each HTML that i called is a table CRUD in a datagrid with its javascript code( addRec, editrec etc, functions)
When i select an option, the datagrid is shown fine but when i click, for example,
[/img]the Add Rec button, i got this message in the javascript console (See Screen One).
And when i changed the panel('refresh',...) in the calling funcion, say
function showPage(strTitle, url) {
if (currentUrl != url ) {
currentUrl = url;
$('#content')
.empty()
.panel('setTitle', strTitle)
.load(url);
}
}
With this change the addRec, Editrec and DeleteRec buttons works fine but the accordion become a mess!! (See Screen two)
TIA,
yamil