Hi everyone,
I recently upgraded from cb 1.0.2 to cb 1.1 using the expert upgrade instructions.
I did everything that was instructed in the readme file.
CB works without any problems except for a javascript error in the bottom left corner of IE7 that reads: 'cbshowtabsArray' is undefined.
I looked in the files that got copied over and all looks fine to me. The object does get created in comprofiler.class.php
But when I look at the source code that gets generated in the html format I see this:
[code:1]<script type="text/javascript"><!--//--><![CDATA[//><!--
var tabPanecb_head;
cbshowtabsArray.push( [,'tabPanecb_head.setSelectedIndex( 0 );'] );
//--><!]]></script>[/code:1]
and after a few lines, the object is created:
[code:1]<script type="text/javascript"><!--//--><![CDATA[//><!--
var tabPanecb_tabmain;
var cbshowtabsArray = new Array();
function showCBTab( sName ) {
if ( typeof(sName) == 'string' ) {
sName = sName.toLowerCase();
}
for (var i=0;i<cbshowtabsArray.length;i++) {
for (var j=0;j<cbshowtabsArray[0].length;j++) {
if (cbshowtabsArray[0][j] == sName) {
eval(cbshowtabsArray[1]);
return;
}
}
}
}
cbshowtabsArray.push( [,'tabPanecb_tabmain.setSelectedIndex( 0 );'] );
cbshowtabsArray.push( [,'tabPanecb_tabmain.setSelectedIndex( 1 );'] );
cbshowtabsArray.push( [,'tabPanecb_tabmain.setSelectedIndex( 2 );'] );
cbshowtabsArray.push( [,'tabPanecb_tabmain.setSelectedIndex( 3 );'] );
cbshowtabsArray.push( [,'tabPanecb_tabmain.setSelectedIndex( 4 );'] );
cbshowtabsArray.push( [,'tabPanecb_tabmain.setSelectedIndex( 5 );'] );
//--><!]]></script>[/code:1]
So basically, the error occurs because the call to the object occurs before the object gets created (for the getportrait tab). Does anyone know where in the code we could fix this so that the javascript object gets created before any tabs are loaded?
Thanks in advance...
Post edited by: nicowolf, at: 2007/08/17 01:48
Post edited by: beat, at: 2007/08/17 02:11
Post edited by: beat, at: 2007/11/15 01:37