Tabbar - setImagePath problem

We’re using Tabbar for the first time and encountered a simple problem in specifying the setImagePath method. Tabbar is working fine but is always only showing the default tab shape/style. Presumably there’s a simple problem with the path we’ve specified to the image files, but I can’t anywhere see a specification of what it should be.

We’re trying to fit the Tabbar files in with our existing folder structure and only want to upload the minimum set of files that we need for Tabbar to run correctly - I suspect this is part of the problem. So:

We’ve got the Tabbar JS script files in a folder called ‘/js’ (relative to our main web page files).

We want to use ‘modern’ for the tab styles and so imagined that placing the four image element files (bottom, left … etc) in a folder called ‘js/modern’ (or maybe ‘js/modern/’ ?) ought to enable them to be found.

But no matter where we place these four files or what we set in setImagePath, we can’t get the style to be recognised. Obviously we haven’t hit upon the right combination.

Anyone able to help please?

Hi,

here is the example…

If you use “modern” skin and tabbar images are placed in the “codebase/imgs/modern” folder, you should pass “codebase/imgs/” to the setImagePath method and define “modern” skin:

tabbar.setImagePath(“codebase/imgs/”);
tabbar.setSkin(“modern”);

There is the sample is the tabbar package:

dhtmlxTabbar/samples/04_styling/01_skins.html

Hi,

here is the example…

If you use “modern” skin and tabbar images are placed in the “codebase/imgs/modern” folder, you should pass “codebase/imgs/” to the setImagePath method and define “modern” skin:

tabbar.setImagePath(“codebase/imgs/”);
tabbar.setSkin(“modern”);

There is the sample is the tabbar package:

dhtmlxTabbar/samples/04_styling/01_skins.html

OK thanks. It may sound simple/obvious, but what I was missing was that the main tab images folder apparently needs to be called literally ‘codebase/imgs’. I was trying to use a different folder naming convention. Presumably ‘codebase/imgs’ is hardcoded somewhere in the scripts?

Presumably ‘codebase/imgs’ is hardcoded somewhere in the scripts?

No, image path isn’t hardcoded.

Could you attached the complete sample where we can recreate the problem ?

Ah OK! In that case I guess I didn’t have the path syntax quite right - not a regular JS user and just needed to put up a quick example on a web page. I must have tried a lot of different folder/path combinations but obviously didn’t hit upon the right combination - probably a misplaced leading or trailing forward slash in the path.

But I’ve now got it working as required - many thanks.