[Seaside] Re: Some hard questions

Jim Benson jb@speed.net
Tue, 11 Jun 2002 22:51:25 -0700


Avi wrote:

> The idea is to have the form autosubmit whenever the select changes?

>
> Have you looked at the browser example that comes with Seaside?  How does
> what you want differ from that?  Is it that you want to use select boxes
> instead of tables of links?
>

Jim wrote:
>
> Yes, it's close, but I need the items to be in a fixed size scrolling
list.
> Potentially I can have several dozen subsections, and I don't really want
my
> users scrolling that far down the page.

Avi answers:

Right.  So I guess a select list with onChange is a good way to go.
As for getting javascript playing nicely with Seaside, I did a little bit
of investigation and I don't think it'll be a problem at all.  Seaside
takes over the "name" attribute but doesn't touch the "id" attribute.
You can thus get at an element using document.getElementById().  So
for example,

<form id="foo" action="@whatever">
 <select onChange="document.getElementById('foo').submit()" ...>
   ...
</form>

Jim says:

Hurray it works like a champ !!!

Have I nominated you for Squeaker of the Year this week yet?

Jim