[TriLUG] "Magic" navigation
William Sutton
william at trilug.org
Tue Oct 23 13:33:55 EDT 2007
I was waiting for him to respond back but my thought is this: If it isn't
necessary to process the text changes between hiding them and revealing
them, then you don't need to post back to the script /at all/ until the
changes are finalized. This would mean changing the page so that
1. the hide/reveal buttons are in a <form> tag with no action attribute
2. any other buttons that don't require postback can also be grouped with
the buttons in #1.
3. any postback buttons can be kept in the existing form tag
4. the buttons grouped in #1 can be <button name="foo"
onClick="javascript_action_here()"> which then handles hide/reveal/etc
5. put <a name="foo" style tags in each text block, and jump to those (or
use some other strategy) at the completion of javascript_action_here()
For client-side-only actions, there's no need to keep posting back to the
server.
William Sutton
On Tue, 23 Oct 2007, Kevin Hunter wrote:
> At 12:17p -0400 on 23 Oct 2007, Brian McCullough wrote:
>> At this point, we want to go to "newTarget", _not_ "target", as shown in
>> the "action" clause of the form, which was set "hours" ago.
>
> Hrm, at the point you're using Javascript, why not just write the anchor
> wherever you want to jump to, and have an onload= function for the body?
> If necessary, you can even dynamically write the Javascript via PHP and
> be good to go. That was one method I used for a similar problem awhile
> back.
>
> Kevin
> --
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>
>
More information about the TriLUG
mailing list