Yes, it's true. The tabs don't work when you have another form on the
page. This problem can be solved if you change the line in forms-lib.js:

document.forms[0][state].value = idx;

to

document.getElementById(state).value=idx;

Then there is another change in the xsl necessary, because the tab-state
widget is not generated with an id attribute (only with a name). In
forms-page-styling.xsl look for the line

 <input type="hidden" name="{$state-widget}"  value="{$active}"/>

and add the id attribute

 <input type="hidden" name="{$state-widget}" id="{$state-widget}"
value="{$active}"/>

Then it works. I don't know it this is a hack or not. 
As far as I have seen, this problem exists in 2.1.7 and 2.1.8 (without
Ajax)

Werner



Am Dienstag, den 25.10.2005, 16:48 +0200 schrieb Josep A. Frau:
> En/na Sylvain Wallez ha escrit:
> 
> > werner wrote:
> >
> >> Hi,
> >>
> >> I know it is not possible to have multiple forms on one page using
> >> cforms. Is there some kind of workaround? I would like to put a
> >> search-field on every page of a website. The website contains also a lot
> >> of other cforms.  So I would like to put a form with a searchfield (does
> >> not need to be a cform) together with another form (this has to be a
> >> cform) on one single page.  Has anybody tried this before?
> >>   
> >
> >
> > There are some parts of the client-side JavaScript libraries that may 
> > prevent the use of multiple CForms in a single page (this will have to 
> > be fixed soon with Ajax apps where the concept of "page" becomes 
> > blurred).
> >
> > But absolutely nothing prevents several other forms to exist on the 
> > page. And your search field can very well post another URL.
> >
> If you use tabs presentation the js libraries use forms[0] in some 
> functions. If you have another form in the page the tabs don't work:
> 
> function forms_showTab(tabgroup, idx, length, state) {
>     // Change state value
>     if (state.length > 0) {
>         document.forms[0][state].value = idx;
>     }
> 
> I don't know if its used in any other place of the libraries.
> 
> > The dangling continuations mentioned by Geert are not a problem, as 
> > they will expire, just as they would if the user closed the browser 
> > window.
> >
> > Sylvain
> >
> 






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]