Folks,
Have created a dynamic windows (IE5.5+ only at the mo) script that works well (not finished yet though).
However, I am having trouble with the created windows scrollbars.
If I change scrollbar colors and run the script, the browser crashes when you click on the scrollbar, but if I dont change the scrollbar colors, the browser doesn't crash..!
I cannot see why.
here is the function to create the windows:
(the scrollbar color change is after z-index:1000
function makeWindow(where,T,L,H,W,titlePic,titleBgColor,mainBgColor,titleTxtFont,titleTxtColor,titleTxt,content){
document.body.attachEvent('onmousemove', moveSelectedWindow);
document.getElementById(where).innerHTML='<table id="window_'+where+'" border="0" cellspacing="0" style="position:absolute;top:'+T+';left:'+L+';width:'+W+';height:'+H+';cursor:default;border:1 solid '+titleBgColor+';z-index:1000;scrollbar-face-color:'+titleBgColor+';" type="draggableWindowObj" onmousedown="Zstacker(this.id)"><tr onmousedown="dragSelectedWindow(\'window_'+where+'\',\'drag\')" onmouseup="dropSelectedWindow(\'window_'+where+'\')" onselectstart="return false;" style="background:'+titleBgColor+';color:'+titleTxtColor+';font-family:'+titleTxtFont+';font-size:10;height:20;"><td style="height:20;" id="window_'+where+'_title"><img align="absmiddle" src="'+titlePic+'" width="17" height="15" border=0 alt="" ondragstart="return false"> <b id="window_'+where+'_title_txt">'+titleTxt+'</b><div id="window_'+where+'_controls" style="position:absolute;top:1;right:1;height:0;font-family:webdings;font-size:10;width:15;cursor:default;background:'+titleBgColor+';" align="center"><b onmousedown="windowButtonControl(\'min\',\'window_'+where+'\')" title="Minimise">2</b> <b onmousedown="windowButtonControl(\'max\',\'window_'+where+'\')" title="Maximise">1</b> <b onmousedown="windowButtonControl(\'close\',\'window_'+where+'\')" title="Close">r</b></div></td></tr><tr><td style="background:'+mainBgColor+'" valign="top"><div id="window_'+where+'_body" style="height:100%;width:100%;overflow:auto;"></div><div type="sizableWindowObj" onmousedown="dragSelectedWindow(\'window_'+where+'\',\'resize\')" onmouseup="dropSelectedWindow()" style="position:absolute;font-family:wingdings 3;font-size:8;bottom:-2;right:0;height:4;width:4;color:'+titleBgColor+';cursor:nw-resize;" title="Resize">y</div></td></tr></table>'
document.getElementById('window_'+where+'_body').innerHTML=content
getStoredWindowSettings('window_'+where)
setStoredWindowSettings('window_'+where)
}
working example: http://www.pwhitrow.com/widgets/window.html
(use view source to view the whole code)
any thoughts..?
Paul
www.pwhitrow.com