Refreshing HTML Windows Without Scrolling to the Top
|
|
I need a good way to have an HTML popup window that, when I output new text to it, will refresh to exactly where it was scrolled to instead of going to the top. I've tried a couple of things, but mostly just tricking it into thinking I didn't change the content at all, such as browse_rsc'ing the HTML over to the user in a file, and then outputting a frame containing the HTML file to the browser. There also doesn't appear to be a way to winset/winget the location of the scroll bars, or this would be easy. I'm pretty sure the solution has something to do with winset/winget or browse_rsc, but I'm not very familiar with either of them, so this is little more than a hunch.
mob/verb/Test() //Browser window opens; window is scrolled all of the way up usr << browse("LOTS OF TEXT! ENOUGH TO MAKE IT SCROLL!!",window="html_window") sleep(60) //Scroll down the page while this sleeps usr << browse("OH MAN! LOTS MORE TEXT! MAYBE EVEN MORE THAN BEFORE!",window="html_window") //Browser window refreshes and jumps all the way to the top. Ideally, it would still be wherever you scrolled to.
Maybe it can be done with a skin control I missed or something. Just hopefully it doesn't need a complicated workaround.</<></<>
|