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 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Layer Clipping in NS 4.7

    Hi, been a while since I have been in the forum. Nice changes...
    I have been working with layers and clipping and got stumped by Netscape ver 4.7 (6 is no problem believe it or not). The archives don't have anything about this type of problem, and I can't find any bug reports either.

    A mouseover calls a function that does the following:

    document.layers[id].clip.bottom=passedVariable;

    But nothing happens. If I do the following:

    document.layers[id].clip.top=passedVariable;

    It works fine, ie the layer gets clipped. I checked to see if the variable was actually being passed:

    document.layers[id].clip.bottom=passedVariable;
    document.formName.textField.value=document.layers[id].clip.bottom;

    and it shows the variable has changed, however the layer has not changed its size.

    Thoughts? Thanks.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Clipping doesn't change the element's size; it simply alters the viewport (visible area). I'm guessing you know that - and that clipping the bottom must be done in a negative direction (from fully revealed, where clip.bottom == Layer.height) to mask the lower part of the layer. Otherwise: never heard of this, but I've never heard of numerous things...

  • #3
    New Coder
    Join Date
    Aug 2002
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Actually the script was right. Unfortunately I believe it was the refresh script required for NS. There was a stylesheet in the header with a clip instruction. Thus everytime the page reloaded/refreshed the stylesheet was reloaded and thus i never saw the change.


  •  

    Posting Permissions

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