Jump to content
Server Maintenance This Week. ×

Filemaker ability to set scroll position of web viewer


This topic is 6112 days old. Please don't post here. Open a new topic instead.

Recommended Posts

This is so important. Wouldn't it be nice to be able to Zero in on an aspect of any web page. The stocks the youtube video. the logo etc. I would like to see scriptable increments in a script step to set the exact location of the webviewer. Just like windows in script steps . this is somewhat the same only it is the amount of "Scroll" set in increments to set the webviewer window to exactly crop a specific area of a web page.

SO IMPORTANT and so easy for Filemaker to implement.

Thanks

Dave

Link to comment
Share on other sites

You have to keep in mind that the web viewer acts as a normal browser would. In a normal browser, you can do this natively.

Perhaps you could do it through a javasript that can reposition a user in a browser, but I have never needed that so I have never tried it.

Link to comment
Share on other sites

I didn't know you could activate a javascript within scriptmaker.

I very badly need to do this. I feel like the ability to zoom in on a location of any web page would make filemaker so much more attractive to the user. Just for the sake of making an instructional application . The user would get framed video off youtube and have a really nice looking presentation.

Link to comment
Share on other sites

The setTimeout is needed (I guess) to allow the page to finish rendering so that everything is in its final palce before you try to scroll it.

If that is the purpose, well you don't need it. window.onload doesn't run until the window, not the document, has finished loading.

Edited by Guest
Link to comment
Share on other sites

  • Newbies

You'd think so, wouldn't you? But I found that putting the scrollTo()call into the onload script just didn't work.

The order that things happen at load time in web browsers and their ilk is a strange and black art. Perhaps in this case it is something to do with the timing of loading the content into the iframe.

Cheers,

Robert

Link to comment
Share on other sites

Hmmm,

Okay i believe you. But when you say it doesn't work - do you mean at all?

You have to call it as:

window.onload = function() {

scrollMe();

}

or otherwise:

window.onload = scrollMe;

Link to comment
Share on other sites

  • Newbies

Ha! Good for you for forcing me to do extra testing... the results are interesting (in a geeky sort of way).

It turns out that putting the scrollTo() call in the onload script does actually work in most cases. The exception is if the user scrolls the web viewer themself and then forces a reload: the scroll position will jump back to where it was set manually, and the scrollTo() call will have no effect. Relinquishing and then regaining control with the setTimeout() trick allows us to force the web viewer to scroll to the right place regardless.

This is the case in Mac OS X, anyway; I tested it in Windows XP as well, but not as extensively.

(N.B. calling the ScrollMe() function from inside the onload function as you suggested just has the same effect as putting the scrollTo() call in there).

Cheers,

Robert

Link to comment
Share on other sites

This topic is 6112 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.