Re: Notice change of window.location.hash without polling
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Notice change of window.location.hash without polling

From: Dennis Ålund <dennis.alund@gmail.com>
Date: Tue Nov 29 2005 - 22:44:55 CET

Thanks for putting it on the table... no good news though, but at least
I can stop searching now.

> How will you determine when a person is at the beginning/end of the
> history trail to know whether to grey out (disable) those buttons?

No need to worry about that. You simply feed a hidden IFRAME with the
application's URL + state information in the hash. Since only the hash
changes the page won't reload (which is very desirable). And these
URL-changes will also be valid browser history = back button gives me
previous state. That solves the problem of knowing when there is no
history to back up to; the browser takes care of it (which is beyond
JavaScript control anyway).
The only problem is how I'll know when the back-button was used...
polling isn't exactly on top ten of best solutions when it's supposed
to notice a button click with good response time :-/

> That's not re-inventing the wheel, that is attempting to re-discover fire.

Anyhow, anyway, in modern days most men are proud every time they
manage to fire up the grill...
Received on Sat Dec 3 04:32:58 2005