Just for Lynx lovers...

After some thought and consideration, I have decided to make Enano compatiable with older browsers that don't support Javascript as well as they should.

Basically, the plan is to port all the code in ajax.php to a new class, PageUtils, and make calls to methods in that class from ajax.php and index.php. The way it works right now is, you click a button on the "page tools" bar, and it calls a Javascript function that performs an AJAX request and then dynamically updates the page with the response text. However, when I originally wrote Enano, I made the template class use a "#" as the href on the <a> tag, so if your browser didn't support Javascript, it would just ignore the onclick value and jump to the top of the page. With the new setup, clicking the button calls the Javascript function and then returns false, so that the href will not be jumped to. The href will be something like "Main_Page?do=comments" and will only be called if the Javascript function fails.

A demonstration of this behavior can be see at http://testbay.enano.homelinux.org/Main_Page?do=comments


(show page tags)
Categories: (Uncategorized)