Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: scrollbars

  1. #1
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default scrollbars

    Is there any way of hiding the scrollbars in a window.

  2. #2
    Join Date
    May 2006
    Posts
    259
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    I’ve got a few things on the go right now but YES you can hide the scroll bar.
    If you haven’t figured it out by the time I get back I’ll show you. God willing of course!
    "Only dead fish flow with the stream".
    - Unknown

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    It's a really bad idea.
    If you don't want scrollbars, limit the size of your page.

    the scrollbars are a functionality issue... they serve a purpose. They aren't graphics for you to play with.

    That's like disabling the mouse cursor when it's above your page. It doesn't help and just makes things weird.

    Maybe you've got a special case, though.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    actualy I do have a special case. please tell me how. the only thing I found was the colors. and I tried changing it to the back. color.

  5. #5
    Join Date
    May 2006
    Posts
    259
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Okay, place the following in the <head> section of your page.

    <script language="javascript" type="text/javascript">
    <!--
    /****************************************************
    Author: Eric King
    Url: http://redrival.com/eak/index.shtml
    This script is free to use as long as this info is left in
    Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
    ****************************************************/
    var win=null;
    function NewWindow(mypage,myname,w,h,scroll,pos){
    if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
    if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
    else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
    settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,re sizable=no';
    win=window.open(mypage,myname,settings);}
    // -->
    </script>

    And use the following as your link. (Edit the size of the page and URL)

    <a href="http://www.google.com#CLICK HERE" onclick="NewWindow(this.href,'','1024','600','yes','top');return false" onfocus="this.blur()">Click Here</a>

    Hope that's what you're looking for.
    "Only dead fish flow with the stream".
    - Unknown

  6. #6
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Or, a much more simple way put this:

    Code:
    <a href = "http://www.google.com#CLICK HERE" onclick="window.open(this.href,'mywindow','width=1024;height=600;scrollbars=no');return false;">My Link</a>

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Doesn't seem to work using Mozilla or Safari. Used that text directly, didn't change much... maybe there's something that I needed to customize.

    Also, that's for a popup.

    I believe the question is to change the current window (or set it in the first place.)

    This would probably be more of a CSS question than javascript, though I'm not sure.

    Also, from what I know JS can only close a window it opened. In the same sense, I doubt that you can change the properties of a window that the js didn't open.
    Might be wrong, though, but I've heard of this, or at least very similar situations in which it's been said to be a security issue, and disabled.... I bet it's the same here.

    However, if you're talking about frames (as some of your other threads have hinted), I believe that you can specify scrolling:no, in the css for that frame... but.. that may be wrong syntax... I've just seen it in passing.

    And... what is your "special case" that causes you to need to change how browsers work?
    No matter what you're doing, the visitor should still be able to scroll the page... that's kinda the point.
    but... maybe you've got a good reason... not saying you don't, but just that generally, it's not a good reason to change how the browser functions.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The best way is to put up a div <div id="mydiv"></div> with styles as follows:

    Code:
    #mydiv{
    height: 100%;
    width: 100%;
    overflow: hidden;
    }
    and to place all the contents inside the div :

    Code:
    <div id="mydiv">
    Some content ...
    <some table>
    and blah blah blah
    </div>
    and to put some script like this (if you want to scroll) http://dhtmlgoodies.com/scripts/scro...lable_div.html

  9. #9
    Join Date
    May 2006
    Posts
    259
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by tech_support
    Or, a much more simple way put this:

    Code:
    <a href = "http://www.google.com#CLICK HERE" onclick="window.open(this.href,'mywindow','width=1024;height=600;scrollbars=no');return false;">My Link</a>
    Actually without the rest of the script it doesn't work. At least not in IE.
    "Only dead fish flow with the stream".
    - Unknown

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    The spaces around the = sign probably don't help.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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