By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,605 Members | 2,147 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,605 IT Pros & Developers. It's quick & easy.

Seeking help with a scroll method

P: n/a
Hoping someone can help me figure out why some code I'm trying to learn
isn't working. I found a javascript scroll effect that I really like
on this page:
http://www.blocparty.com/go.php?object=music

Particularly I'm focusing on the scroll for the "LYRICS" section. My
javascript knowledge is pretty limited, but the code seems really
simple so I figured I'd be able to learn to use it for myself. I tried
implementing it a couple of different ways, but could never get the
scroll to actually work. Finally I just copied the whole blocparty
page onto my server, changing the relative links to absolutes:
http://70.103.140.143/~sandieh2/test/javascroll3.html

All the content gets pulled in fine, but the scroll doesn't work here
either. I'm wondering if it has something to do with the method being
used which is "scroll02". I can't find any reference to that in
javascript guides. Earlier on the page, they use "scroll01", so I
thought maybe it referenced something declared somewhere else on their
server, but I'm stumped. If anyone feels like looking at this and can
offer me a tip, I'd really appreciate it...

Sep 18 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
xl******@gmail.com wrote:
Hoping someone can help me figure out why some code I'm trying to learn
isn't working. I found a javascript scroll effect that I really like
on this page:
http://www.blocparty.com/go.php?object=music
That page has issues with cross-domain scripting errors, Safari reports:

Unsafe JavaScript attempt to access frame with URL
http://70.103.140.143/~sandieh2/test/javascroll3.html from frame with
URL http://www.blocparty.com/_objects/music/eps.php. Domains must match.

It pumped out over 1,700 of them in a few seconds.

In regard to scrolling, it uses mouseover/out/down events in the parent
window to set global variables. A function is run in the frames to run
every 10ms using setInterval (which for most browsers means it will just
run as fast as it can) and look at the global variable in the parent
window. Depending on that variable, the frame scrolls up or down.

It is a very resource-hungry script, and quite frankly is a terrible way
to scroll the frame. Combined with the cross-domain script error (which
also seems to be running on a very short timeout) I think you should
look for a better scroll script. This stuff is complete crap - it
consumes considerable resources just sitting there doing nothing.

[...]

--
Rob
Sep 18 '06 #2

P: n/a
Thanks for the education Rob. I'm having trouble finding another
script that gives me that kind of button control, but what you point
out makes me want to searh a little harder.

RobG wrote:
xl******@gmail.com wrote:
Hoping someone can help me figure out why some code I'm trying to learn
isn't working. I found a javascript scroll effect that I really like
on this page:
http://www.blocparty.com/go.php?object=music

That page has issues with cross-domain scripting errors, Safari reports:

Unsafe JavaScript attempt to access frame with URL
http://70.103.140.143/~sandieh2/test/javascroll3.html from frame with
URL http://www.blocparty.com/_objects/music/eps.php. Domains must match.

It pumped out over 1,700 of them in a few seconds.

In regard to scrolling, it uses mouseover/out/down events in the parent
window to set global variables. A function is run in the frames to run
every 10ms using setInterval (which for most browsers means it will just
run as fast as it can) and look at the global variable in the parent
window. Depending on that variable, the frame scrolls up or down.

It is a very resource-hungry script, and quite frankly is a terrible way
to scroll the frame. Combined with the cross-domain script error (which
also seems to be running on a very short timeout) I think you should
look for a better scroll script. This stuff is complete crap - it
consumes considerable resources just sitting there doing nothing.

[...]

--
Rob
Sep 18 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.