View Full Version : newB - and yet another: Any way to disable browser back button?
esc_oblivion
04-28-2004, 10:25 AM
I only ask because it's become apparent to me that some means of controlling this is necessary. If you visit www.flatlandsexports.com and go anywhere on their site and then click "back" to go to the previous screen (at least that's what you intend to happen) it'll take you all the way back to the page you were on BEFORE going to the flatlandexports page.
Is there a means of putting in controls that tie to the browser interface? So that the user could use the back button to essentially undo their last action?
THanks! - Abe
antun
04-28-2004, 10:52 AM
There is not a clear-cut and easy way to do this right now, but it is on the Laszlo roadmap.
The back button dilemma has been worked around in the past by setting a cookie from the Laszlo app when the user performs some action that is to be recorded, and having the app check on startup for the existence of a cookie, so it can replay that action. This solves the problem of the user clicking the back button, the trying to return to the app, and losing its state.
This doesn't solve the issue you raised of integrating the browser's history of with the Laszlo app, so several actions could be recorded and "rewound" using the back button. That would come down to Flash Player-browser JavaScript integration, and I'm not sure how much earlier versions of the Flash player support this, or how standard this is across browsers.
Like I said, this is on the roadmap for the future, so there will be more developer friendly APIs, but for now your best bet is to avoid losing an important app state by using cookies. If you search these forums, you'll find more on how to do that.
However the single most important factor in my opinion is app design. If you design your app to look like a number of web pages, people will want to reach for the back button.
-Antun
esc_oblivion
04-28-2004, 04:05 PM
Thanks for replying so quickly, it's much appreciated. : -)
So, one last question on this topic... would it be possible to wrap an otherwise normal LZX page in javascript which could facilitate controlling the browser?
Or, does Laszlo have the ability to refer to classes or java outside of itself? (or an individual page)
I hope the above makes sense. Your idea of luring the user to avoid using the actual browser back button by giving them a better option is a good one, but I like to keep all my bases covered, especially realizing that if I - being an advanced user - trip over myself continuously when using flash pages and never seem to break old habits (back button) then others are probably at least, if not much much worse.
antun
04-30-2004, 08:32 AM
So, one last question on this topic... would it be possible to wrap an otherwise normal LZX page in javascript which could facilitate controlling the browser?
Not at the moment because there are no hooks to the browser DOM in LZX. However you can call some JavaScript on the browser from within a Laszlo app:
http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=485&highlight=javascript+lzbrowser
-Antun
frethog
11-02-2007, 12:13 PM
"There is not a clear-cut and easy way to do this right now, but it is on the Laszlo roadmap."
Three years later, where does this feature lie on the roadmap?
thx,
frethog
12-15-2008, 12:07 PM
Saw this in Antun's blog post and realized it could solve the Back button problem for some OL applications. Thanks Antun!
http://www.antunkarlovac.com/blog/2007/09/13/naked-air/#more-50
http://www.benefit-from-it.com/index.php?fa=wdu101pageStructure.chromeless
frethog
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.