0

How to scroll iframe automatically?

asked 2007-11-14 12:27:23 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4622837

By: rolfn

In the following example I create an "iframe" with a web content. After click on the button I see the top of the web page:
----------------
<window height="400px" width="100%" >
<button label="show">
<attribute name="onClick">
gnu.setVisible(true);
</attribute>
</button>
<iframe height="100%" width="100%" id="gnu"
src="http://www.gnu.org" visible="false" /> </window>
----------------
How can I show the bottom of the web page after the click? I have tried

gnu.setAction("[onshow]:scrollTo(0,9999);");

but this has no effect. Thanks in advance.

...Rolf


delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2011-09-02 08:47:05 +0800

thxbb12 gravatar image thxbb12
36

Hello,

I would like to achieve the same as the OP, but so far no luck.

I tried to use Clients.scrollIntoView(myIframe) but it doesn't seem to work.

Anyone?

Thanks!

link publish delete flag offensive edit

answered 2011-09-02 11:55:45 +0800

TonyQ gravatar image TonyQ
642
https://www.masterbranch....

no , you can't access the iframe if they are not under the same domain.

link publish delete flag offensive edit

answered 2011-09-13 02:46:24 +0800

thxbb12 gravatar image thxbb12
36

What do you mean "under the same domain"?

Is there another way of doing it?

link publish delete flag offensive edit

answered 2011-09-13 10:18:15 +0800

TonyQ gravatar image TonyQ
642
https://www.masterbranch....

For example , if your website is "www.A.com" but you are accessing "www.B.com" in a iframe, there got no any possibility to scroll the iframe.

You could reference this thread for advanced details.

http://stackoverflow.com/questions/1192228/scrolling-an-iframe-with-javascript

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2007-11-14 12:27:23 +0800

Seen: 394 times

Last updated: Sep 13 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More