Archive of UserLand's first discussion group, started October 5, 1998.

Re: Frontier can Hoist

Author:Michael Johnston
Posted:3/10/1999; 3:03:37 AM
Topic:ADSL
Msg #:3869 (In response to 3854)
Prev/Next:3868 / 3870

I've been thinking about a non-dhtml way to do outlines that should work even in v3 browsers. I haven't had time to actually build it yet, but here's the idea...

You have to use frames. You have a top-level frame and a display frame and a very small "data" frame. The top level frame gets an outline by doing a GET to an fcgi...uhmm, I mean mainresponder script object. The script returns the outline in JavaScript by dynamycally creating a JavaScript class that mirrors the structure of the outline, and the target of the GET is the data frame, the html is just an empty page.

Now JavaScript in the top-level frame can display the outline in the display frame by writing html to it, pulling the info from the JavaScript class in the "data" frame. The collapse/expand images are in tags with JavaScript urls that call a function that rewrites the display frame, toggling the state of that headline.

to edit a headline, click on it and a JavaScript function is called that pops a little window with a textarea. When you're all done browsing/editing the outline, click a save button and the JavaScript class representation of the outline is sent back to frontier with a POST.

It's clumsier than a java applet or dhtml, the screen will flash every time you collapse/expand something, but it'll work in 95% or more of current browser population.


There are responses to this message:


This page was archived on 6/13/2001; 4:48:36 PM.

© Copyright 1998-2001 UserLand Software, Inc.