Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Beginners questions (scrollbars and more)

Reply
Thread Tools

Beginners questions (scrollbars and more)

 
 
January Weiner
Guest
Posts: n/a
 
      08-10-2009
Hello all,

I am fairly new to ECMAscript/Javascript. I am developing an app which
allows the user to scroll an "infinite" image horizontally. The image is
provided by a CGI script in chunks (say, PNGs of size 600x200 px). The
whole image would have been way to large to load it in one go, not to
mention the size of the associated imagemap.

The whole point of involving ECMAscript for me is to get a smooth
animation. This is how I do it: I load three images initially, but the one
on the left and the one of the right are hidden by whitescreens (div
elements with fixed position and background color set to white). The left
one has negative position and is off the document page.

When the image has to be scrolled -- say, to the left -- I call an
animation function that slowly moves the images to the left. When the
animation is done, I request (using XMLHttpRequest / Microsoft.XMLHTTP) the
following (fourth image) and insert it into a fourth image slot (on the
right). Then I kill the left-most slot.

It all runs actually much better than I expected at first, but there is a
small problem. At the bottom of the window there is a scrolling bar that
changes its size / position during the operation. This is because of the
rightmost whitescreen, covering the rightmost image slot (that just sits
there and waits to be displayed).

What can I do about it? Or maybe the whole approach is flawed?

Cheers,
j.
 
Reply With Quote
 
 
 
 
Gregor Kofler
Guest
Posts: n/a
 
      08-10-2009
January Weiner meinte:

> small problem. At the bottom of the window there is a scrolling bar that
> changes its size / position during the operation. This is because of the
> rightmost whitescreen, covering the rightmost image slot (that just sits
> there and waits to be displayed).


Apply overflow: hidden on an appropriate container. It's a CSS problem,
not a JS issue.

Gregor

--
http://www.gregorkofler.com
http://web.gregorkofler.com - vxJS, a JS lib in progress
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
2x beginners questions Chris Bradshaw C Programming 3 02-24-2011 01:26 AM
a few beginners questions .... Thomas Java 11 07-11-2007 02:45 AM
A few beginners questions wannaberor Ruby 14 04-22-2007 09:28 PM
Beginners questions for addition Clemens Bosch VHDL 0 12-02-2004 02:20 PM
Beginners questions: Using EJBs on two Workstations bebonights Java 0 10-13-2003 02:28 PM



Advertisments