August 3, 200718 yr 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
August 3, 200718 yr 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.
August 3, 200718 yr Author 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.
August 4, 200718 yr 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 August 4, 200718 yr by Guest
August 4, 200718 yr 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
August 4, 200718 yr 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;
August 4, 200718 yr 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
August 4, 200718 yr the results are interesting (in a geeky sort of way). Is there any other kind? Lol! GW, thanks for the info.
Create an account or sign in to comment