...

View Full Version : can i get a js popup window script to show a custom scrollbar?



canadianjameson
11-04-2004, 03:14 AM
i currently use this script to generate popup windows



<script type=text/javascript>
function newWin(urlLoc) {
_winName = "HTMLview";
_info = "toolbar=yes"; // yes|no
_info += ",location=no"; // yes|no
_info += ",directories=no";// yes|no
_info += ",status=no"; // yes|no
_info += ",menubar=yes"; // yes|no
_info += ",scrollbars=yes";// yes|no
_info += ",resizable=yes"; // yes|no
_info += ",dependent"; // close the parent, close the popup, omit if you want otherwise
DispWin=window.open(urlLoc,_winName,_info);
DispWin.focus()
}
</script>

opened with this:
<a href="javascript:newWin('prodInfo/Sirco/PVS.htm');">blahblah</a>


but i would like the window to have this custom scrollbar:


BODY {
scrollbar-arrow-color:#000000;
scrollbar-track-color:#FFFFFF;
scrollbar-shadow-color:#000000;
scrollbar-face-color:#FFFFFF;
scrollbar-highlight-color:#000000;
scrollbar-darkshadow-color:#FFFFFF;
scrollbar-3dlight-color:#FFFFFF}


how would i get the JS script to use the above CSS?

p.s: i have that CSS in a .css file if thats easier to call...

A1ien51
11-04-2004, 04:05 AM
put the css code into the html of the page that you are calling.

canadianjameson
11-04-2004, 05:14 AM
i meant can i do it via the JS popup code above

A1ien51
11-04-2004, 03:12 PM
DispWin.focus()
DispWin.document.body.style.scrollbarArrowColor = "#000000";
DispWin.document.body.style.scrollbarTrackColor = "#FFFFFF";


try that....
not sure if it will work, but you never know....
Eric

canadianjameson
11-05-2004, 12:19 AM
i like the approach, but that syntax doesnt work.

can anyone make it work?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum