54 users online (1 members and 53 guests)  


  Results 1 to 11 of 11

Related

  1. scroll box help    Forum: HTML Forum
    Replies: 0
  2. Replies: 6
  3. Scroll Bar Question    Forum: HTML Forum
    Replies: 3
  4. Scroll Bar Question    Forum: CSS Forum
    Replies: 2
  5. Scroll Bar Question    Forum: HTML Forum
    Replies: 0
  1. #1
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83

    Scroll Bar Question

    ---Helllo

    ---Does Anybody Happen To Know How To Modify
    ---This Code So That I Can Change The Colors Of
    ---The Scroll Bars On The Image Pop Up Windows?

    Code:
    <script>
    
    // Script Source: CodeLifter.com
    // Copyright 2003
    // Do not remove this notice.
    
    // SETUPS:
    // ===============================
    
    // Set the horizontal and vertical position for the popup
    
    PositionX = 0;
    PositionY = 0;
    
    // Set these value approximately 20 pixels greater than the
    // size of the largest image to be used (needed for Netscape)
    
    defaultWidth  = 500;
    defaultHeight = 500;
    
    // Set autoclose true to have the window close automatically
    // Set autoclose false to allow multiple popup windows
    
    var AutoClose = true;
    
    // Do not edit below this line...
    // ================================
    if (p****Int(navigator.appVersion.charAt(0))>=4){
    var isNN=(navigator.appName=="Netscape")?1:0;
    var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
    var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
    var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
    function popImage(imageURL,imageTitle){
    if (isNN){imgWin=window.open('about:blank','',optNN);}
    if (isIE){imgWin=window.open('about:blank','',optIE);}
    with (imgWin.document){
    writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
    writeln('var isNN,isIE;');writeln('if (p****Int(navigator.appVersion.charAt(0))>=4){');
    writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
    writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
    writeln('width=100-(document.body.clientWidth-document.images[0].width);');
    writeln('height=100-(document.body.clientHeight-document.images[0].height);');
    writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
    writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
    writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
    if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
    else writeln('</head><body bgcolor=000000 scroll="yes" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
    writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
    close();		
    }}
    </script>
    ---Thanx

    ---DaWebmasta

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    For each of the </head> lines here

    Code:
    if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
    else writeln('</head>
    Add your normal scrollbar colour code (which I remember you as having) and it will work fine.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83
    ---Thanx Quietdean For The Help...You Rock

    ---Thanx,

    ---DaWebmasta

  4. #4
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83
    ---Sorry For The Double Post...But I Don't Think I'm
    ---Putting My Scroll Bars Colors In The Right Place,
    ---Because It Doesn't Seem To Work...Can You
    ---Please Tell Me Where I Need To Put Them In My
    ---Code

    ---Thanx

    ---DaWebmasta

  5. #5
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Basically, wherever you see </head> within a writeLn section, put it there.

    If not sure, paste your version, showing where you pasted, and I'll have a look.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  6. #6
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83
    ---Sorry It Took Me So Long To Reply...But I've Had
    ---A Hectic Schedule As Of Late...Well Here Is My
    ---Code...Please Don't Laugh, Because I Know I
    ---Probably Put It No Where Close To Where It Is
    ---Supposed To Go...But O Well:

    Code:
    <script>
    
    // Script Source: CodeLifter.com
    // Copyright 2003
    // Do not remove this notice.
    
    // SETUPS:
    // ===============================
    
    // Set the horizontal and vertical position for the popup
    
    PositionX = 0;
    PositionY = 0;
    
    // Set these value approximately 20 pixels greater than the
    // size of the largest image to be used (needed for Netscape)
    
    defaultWidth  = 500;
    defaultHeight = 500;
    
    // Set autoclose true to have the window close automatically
    // Set autoclose false to allow multiple popup windows
    
    var AutoClose = true;
    
    // Do not edit below this line...
    // ================================
    if (parseInt(navigator.appVersion.charAt(0))>=4){
    var isNN=(navigator.appName=="Netscape")?1:0;
    var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
    var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
    var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
    function popImage(imageURL,imageTitle){
    if (isNN){imgWin=window.open('about:blank','',optNN);}
    if (isIE){imgWin=window.open('about:blank','',optIE);}
    with (imgWin.document){
    writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
    writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
    writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
    writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
    writeln('width=100-(document.body.clientWidth-document.images[0].width);');
    writeln('height=100-(document.body.clientHeight-document.images[0].height);');
    writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
    writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
    writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
    if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
    else writeln('</head><style>
    <!--
    body
    
      { 
       color:                      #000000;
       scrollbar-face-color:       #A5A2FF;
       scrollbar-highlight-color:  #A5A2FF;
       scrollbar-shadow-color:     #A5A2FF;
       scrollbar-3Dlight-color:    #A5A2FF;
       scrollbar-arrow-color:      #FFFFFF;
       scrollbar-track-color:      #A5A2FF;
       scrollbar-darkshadow-color: #A5A2FF;
       }
    
    -->
    </style>
    <body bgcolor=000000 scroll="yes" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
    writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
    close();		
    }}
    </script>
    ---Thanx

    ---DaWebmasta

  7. #7
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    I see what its doing. Too many of the characters in the code you added actually mean something in JavaScript, it gets confused, and breaks.

    Instead save all this

    Code:
    body
    
      { 
       color:                      #000000;
       scrollbar-face-color:       #A5A2FF;
       scrollbar-highlight-color:  #A5A2FF;
       scrollbar-shadow-color:     #A5A2FF;
       scrollbar-3Dlight-color:    #A5A2FF;
       scrollbar-arrow-color:      #FFFFFF;
       scrollbar-track-color:      #A5A2FF;
       scrollbar-darkshadow-color: #A5A2FF;
       }
    as, lets say, scrollbars.css. upload it. Then add this to your code instead

    Code:
    <link rel=stylesheet href=scrollbars.css type=text/css>
    Its not technically perfect (missing the " symbols) but it should work. Add that line before both </head> sections.

    See if that works.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  8. #8
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83
    ---Alright...I Did That And I Created A Style Sheet
    ---For It And Everything But It Still Doesn't
    ---Work...Here's The Style Sheet I'm Usin...Can You
    ---Please Tell Me If I Screwed Up Somewhere...Thanx:


    ---DaWebmasta
    Last edited by HTML; 01-21-2005 at 09:09 AM.

  9. #9
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    File not found, I imagine that might be the problem overall.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  10. #10
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83
    ---Are You Sure QuietDean...Because When I Click
    ---The Link...It Opens The Files In Microsoft Front Page

    ---DaWebmasta

  11. #11
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    I removed the link due to the crap it wanted me to download and being trapped on the page with js alerts "you must click yes" type crap.

    Since you are hosted at a free host who does this browser trapping crap and trys to set your homepage as well as install crap ware, I must insist that you try your own links before posting them. If I, or any other member complains of this again I will have to set all your posts to go through moderation before your posts are made public.

    Dave



Tags for this Thread