Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts

    can i get a js popup window script to show a custom scrollbar?

    i currently use this script to generate popup windows

    Code:
    <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:
    Code:
    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...
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    put the css code into the html of the page that you are calling.
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    i meant can i do it via the JS popup code above
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #4
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    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
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #5
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    i like the approach, but that syntax doesnt work.

    can anyone make it work?
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •