PDA

View Full Version : DD Custom Scroller icon position change?



Dance10Looks10
08-27-2005, 04:47 AM
Here's the link: http://www.dynamicdrive.com/dynamicindex2/pagescroller.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?

jscheuer1
08-27-2005, 12:27 PM
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:

.

If you really want the icons in the upper left, change:

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:

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.

Dance10Looks10
08-27-2005, 06:16 PM
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!