Tabs do not initialize

Hello,



Even though I have included the necessary files for TabBar, I keep getting a “not defined” -message.



I went through the basic examples and it seems pretty straightforward. Just include the general JS, as well as the two tab JS files. Then, create a div and initialize a new dhtmlXTabBar for that div.



Here are the includes and the rest of the source:















var tabbar=new dhtmlXTabBar(“a_tabbar”,“top”);

tabbar.setImagePath("…/imgs/");

tabbar.loadXML(“tabs7.xml”);



Even this simple thing doesn’t work because dhtmlXTabBar is not defined. What am could I possibly be doing wrong?

You are using in your paths “…” - 3 dots, is it have any special meaning?
The reason of error - dhtmlxtabbar.js can’t be located, most probably because used path is incorrect.

You are using in your paths “…” - 3 dots, is it have any special meaning?
No, the 3 dots just represent the path to the file. The path is actually much longer :wink:

The reason of error - dhtmlxtabbar.js can’t be located, most probably because used path is incorrect.
I thought the problem was locating the JS files, but I also tried putting them into the same folder. I am familiar with including JS files, their paths and so on, that can not be the problem. However, from previous experience that’s what I thought of as well, since the object that should be initialized just doesn’t exist. It’s the oddest thing, this should work without problems especially if the JS is in the same folder as the  .jsp file that contains the initializing script.

I’m using a mac with firefox 2. The script is in a Apache/Tomcat environment.

Try the next thing - load the page with tabbar in FF, and after page loading remove “index.html” part of url and put the path, used for js file there - if path correct, then content of js file must be shown.

>>I’m using a mac with firefox 2. The script is in a Apache/Tomcat environment.
The TomCat process files case sentensive, so if you are using full path - be sure that case of path and file name exactly the same as on file system.

Yes, the JS file contents are shown in Firebug “script” view. I know this because if the path is incorrect, the script view doesn’t show the source, but instead a Tomcat “file not found” -error message. The script seems to get loaded nicely. I did forget to add the CSS file, which I now added.

I actually got the tabs working now, strangely enough. I mean, I didn’t make any significant changes. It could be some caching problem with a combination of Mac/Firefox/Javascript? I’m working with Eclipse, which has occasional weird publishing behavior as well.






It could be some caching problem with a combination of Mac/Firefox/Javascript?
May be so. If you have loaded the page with incorrect script path first time, FF may cache incorrect response, and reuse it instead of loading correct files next time.

if you are using a jsp try deleting



Once I delete from the JSP it runs OK.