If by scroll you mean “scroll automatically”, then you need to read
the following. If you don’t, and what you mean is "make a window in
the page and allow someone to scroll (manually) a page inside that
window, then all you need is an iframe, and there’s an Action for
that, built in if I’m not mistaken.
Strictly speaking, you can’t automatically scroll another page
(especially on another server) within your page if you’re using an
iframe for your scrolling container. The scroll position of a page is
driven by the page that’s being scrolled, and the outer page (the one
holding the iframe) cannot change anything about the inner page,
including its scroll offset. If that inner page has a function
included in IT that causes the page to scroll by itself without user
interaction, then that same function would do the same trick when the
page is viewed through an iframe as if it was viewed in its own
browser window. An iframe is simply a hole cut in the page through
which you can view another page entirely. In effect, it treats the
outer page as an extension of the browser window “chrome”.
If you are using a DIV (HTML box) to hold the other page and then
scrolling that using JavaScript controls on the outer page, then by
definition its content cannot be another page. The only thing you can
legally put inside a DIV on your page is a “page fragment”. If you put
an entire other page inside a DIV, you end up with nested HTML, HEAD,
and BODY tags, and that’s so far gone that some browsers will blow up,
and most will be confused to the point that you won’t be able to run
any JavaScript on the outer page at all. A fragment is a snippet of
HTML describing one element or a group of elements on the page. It
does not include any of the page-level tags like HEAD and BODY etc.
It’s also important that this snippet does not contain any elements
that are named exactly the same as any elements in the parent page
into which you are inserting it.
If you can satisfy these requirements, and if the page fragment is
hosted on the same server as your parent page, then it is utterly
trivial to put content from a fragment into an HTML box on your page.
- Apply Protaculous to the page, if it isn’t already. Choose
prototype-packed from the Library picker.
- Click on your HTML box and note its exact name from the Title field
in the Inspector. (case-sensitive)
- Click on the page somewhere, then click on the top Function Body
button and enter the following script.
new Ajax.Updater('nameOfDiv','name_of_page.html',{method:'get'});
Obviously, change the nameOfDiv and name_of_page to match yours, and
make sure that the page you are linking to is really a fragment
(TemplateHelper can make these for you very easily, by switching on
its Partial mode).
Now if you have set up your scrolling action to use the DIV you
updated with Ajax.Updater, then it will just work.
Walter
On Jul 15, 2010, at 9:03 AM, Russ Taylor wrote:
I can see how scroller pro works, and believe the same kind of
effect can be done using the ScrollContent action suite as well.
What I am wondering is if it is possible to take the content of one
page and have it scroll in another?
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options