Greetings,

We're having some difficulties with javascript events in BE template and any 
help would be appreciated.

We have input field and dropdown list in our BE template. What we're trying to 
do is to dynamically fill 
dropdown list once the input field is filled. We've tried the following rule:

<rule for="/document/page/myInputField">
        <events>
                <on-value-changed>
                  <javascript>
                        var list = 
"cocoon://extensions/project-specific/createNodeList"; 
                        var rootKey=event.source.getValue(); 
                        var 
myDropDownWidget=lookupWidget(event.source,"/document/page/myDropDown"); 
                     
                        if (rootKey != null) {
                                myDropDownWidget.setSelectionList(list + "/" + 
rootKey);     
                      } else {
                                myDropDownWidget.setSelectionList(new 
Packages.org.apache.cocoon.forms.datatype.EmptySelectionList("Enter URL 
                                first..."));    
                        }
                        myDropDownWidget.value = null;
    
          </javascript>
          </on-value-changed>
        </events>
 </rule>

The idea is to use the URL from myInputField, fetch that document, transform it 
to node list and fill the myDropDown.
Our code is based on [1].
When we try to edit the page in CMS all we get is blank page. 

Can you tell us what are we doing wrong?

[1] http://www.hippocms.org/display/CMS/HOWTO+Related+Dropdown+Lists

Met vriendelijke groet / Kind regards,
Dejan Maric
Software Developer
Levi9 Global Sourcing
________________________________________
_  Jan van Goyenkade 8, 1075 HP Amsterdam, The Netherlands 
     (+31) (0) 20 6701 947 
    (+381) (0) 63 547 096 
     [EMAIL PROTECTED] 
    Skype: chromy96 
�    www.levi9.com 

Chamber of commerce Levi9 Global Sourcing BV: 34221951
Chamber of commerce Levi9 Global Sourcing Benelux BV: 34224746
________________________________________
This e-mail may contain confidential or privileged information. If you are not 
(one of) the intended recipient(s), please notify the sender immediately by 
reply e-mail and delete this message and any attachments permanently without 
retaining a copy. Any review, disclosure, copying, distribution or taking any 
action in reliance on the contents of this e-mail by persons or entities other 
than the intended recipient(s) is strictly prohibited and may be unlawful. 

The services of Levi9 are exclusively subject to its general terms and 
conditions. These general terms and conditions can be found on www.levi9.com 
and a copy will be promptly submitted to you on your request and free of charge.


********************************************
Hippocms-dev: Hippo CMS development public mailinglist

Reply via email to