JavaScript.CoolDev.Com Support Forums

Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

An anoying rectangle

 
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu
Author Message
jorge



Joined: 06 Oct 2003
Posts: 1
Location: Copenhagen, Denmark

PostPosted: Mon Oct 06, 2003 2:40 pm    Post subject: An anoying rectangle Reply with quote

I get a rectangle on top of the menu pics.


The code is:

<script type="text/javascript">

var code="code";
var ocode="ocode";
var url="url";
var sub="sub";

var STYLE = {
"border":0,
"shadow":0,
"color":{"border":"#FEFBF3", "shadow":"#FEFBF3", "bgON":"FEFBF3","bgOVER":"#FEFBF3", "imagebg":"#FEFBF3", "oimagebg":"#FEFBF3"},
"css":{"ON":"clsCMOn", "OVER":"clsCMOver"}
};

var STYLELEVEL1 = {
"border":1,
"shadow":0,
"color":{"border":"Black", "shadow":"#DBD8D1", "bgON":"#EAEAEA","bgOVER":"#CCCCCC"},
"css":{"ON":"clsCMOnLevel1", "OVER":"clsCMOverLevel1"}
};

function getItemOff(docID) {
if (docID==5) {
return 38;
};
var imgW = new Image();
imgW.src = "/images/topmenu/img" + docID + "_on.gif";
return imgW.width;
};

function getLevelOff(docID) {
if (docID==8 ) {
return 0;
};
var imgW = new Image();
imgW.src = "/images/topmenu/img" + docID + "_on.gif";
return imgW.width;
};

function getWidth(docID) {
var imgW = new Image();
imgW.src = "/images/topmenu/img" + docID + "_on.gif";
return imgW.width;
};

var MENU_ITEMS =
[
{"pos":"relative", "itemoff":[0,38], "style":STYLE, "size":[19,38]},
{"code":'<img src="/images/topmenu/img8_off.gif">', "ocode":'<img src="/images/topmenu/img8_on.gif">', url:"/smcms/FORSIDE/Index.htm?ID=8", "format":{"leveloff":[0,getLevelOff("8")], "itemoff":[0,getItemOff("8")], "size":[19,getWidth("8")]}
, sub:[
{"itemoff":[18,0], "leveloff":[19,0], "style":STYLELEVEL1, "size":[19,122]},
{code:"Bliv kunde i Fair og spar op til 50%", url:"/smcms/FORSIDE/Bliv_kunde_i_Fair/Index.htm?ID=3531", "size":[19,122]},
]

},

... and so on

the CSS:
DIV {
}

.clsCMOn {
}

.clsCMOver {
}

...
Back to top
Sergey Nosenko
Developer


Joined: 19 Jan 2003
Posts: 75

PostPosted: Tue Oct 07, 2003 11:51 am    Post subject: Reply with quote

This happens because browser cannot find required blank image - it
must somewhere in the directory structure of your site in order to get
menu working without these red crosses. To resolve this issue, put
b.gif to some folder (e.g. 'img'). Then insert into the menuitems.js
file the following line:

var BLANK_IMAGE = "img/b.gif";

This line must be inserted at the top of the file, and path in the
double quotes must point to b.gif no matter where you've put it.

Menu FAQ #15
Back to top
Display posts from previous:   
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu All times are GMT
Page 1 of 1