Results 1 to 3 of 3

Thread: DD Custom Scroller icon position change?

  1. #1
    Join Date
    Aug 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DD Custom Scroller icon position change?

    Here's the link: http://www.dynamicdrive.com/dynamici...gescroller.htm

    Is there a reason for the scroller icons to be in the lower right corner of the screen rather than in the upper left corner?

    Most languages are written and read from left to right and top to bottom. Yes, I know there are exceptions but the vast majority of languages work this way.

    If the code was based on pixels from the TOP left edge and pixels from the TOP edge, this would be a dynamite script! Is there a simple way to achieve this?

    As it is now, trying to capture the User's screen resulotion and/or current window size on the fly and calculate the position of the icons based on lower-right coordinates is almost impossible. In addition, there's no way to tell if the user has resized the window. The icons don't move, by the way. they just disappear in to lah-lah land.

    Can you help?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Dance10Looks10
    As it is now, trying to capture the User's screen resulotion and/or current window size on the fly and calculate the position of the icons based on lower-right coordinates is almost impossible. In addition, there's no way to tell if the user has resized the window. The icons don't move, by the way. they just disappear in to lah-lah land.
    This is not how the demo appears here using either IE6 or FF on a windows platform. What OS and browser are you using? The demo appears here to work at any screen res or window size. Resizing the window has no effect on the visibility of the icons as, they move to accommodate. If the demo works this way for you too and it is just your implementation of the script that has these problems, perhaps you have changed the code or surrounded it in an element that cannot adapt. There are other possibilities so, if it is just your implementation:

    PLEASE: Include the URL to your problematic webpage that you want help with.

    If you really want the icons in the upper left, change:
    Code:
    if (document.all||document.getElementById){
    cross_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-Hoffset+"px"
    cross_obj.style.top=dsoctop+parseInt(window_height)-Voffset+"px"
    }
    to:
    Code:
    if (document.all||document.getElementById){
    cross_obj.style.left=Hoffset+"px"
    cross_obj.style.top=dsoctop+Voffset+"px"
    }
    This works here. It may or may not work for you, depending upon why the original script wasn't working for you.
    Last edited by jscheuer1; 08-27-2005 at 06:21 PM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you, John. You've come to my aid before.

    I'm runing MS WindowsXP Pro with resolutions from 800X600 up to 1280X1024.

    The icons realy do disappear here but, more importantly, Americans look to the upper left for the important things. I'll code this up and, based on your past advice, I'm sure it will work.

    Again, Thank you!

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
  •