cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Vincelli <a.vince...@w4b.it>
Subject Re: Multiple forms per page
Date Tue, 13 Dec 2005 15:24:23 GMT

I have a problem in cocoon 2.1.8 with a tab form...

in Explorer no problem

in Firefox this error:
Error: document.getElementById(state) has no properties
Source File: ... /js/forms-lib.js Line: 180

in forms-libs.js


function forms_showTab(tabgroup, idx, length, state) {
     // Change state value
     if (state.length > 0) {
         document.getElementById(state).value = idx;
     }
....


Can you help me?

thanks in advance, Alessandro




-------------------------------
Alessandro Vincelli
W4B - web for business s.r.l.
Firenze
via Pellicceria 10 - 50123
E-mail: a.vincelli@w4b.it
tel: 055-2654270


Sylvain Wallez ha scritto:
> werner wrote:
> 
>> 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)
>>   
> 
> 
> It will be in 2.1.8 :-)
> 
> Thanks for spotting this!
> 
> Sylvain
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message