[Dojo-interest] form submit in ContentPanes

Christian Thies christian.thies at go-community.de
Wed Feb 7 08:54:11 MST 2007


Hi everybody!

I'm trying to submit forms within a dynamically loaded ContentPane, like
...
<div id="dw_content" dojoType="ContentPane" widgetId="display" 
layoutAlign="client" cacheContent="false" 
href="/_framesets/start_content.html" preventCache="true" 
useCache="false" refreshOnShow="true" executeScripts="true">
</div>
...

After loading another url to that pane via 
"dojo.widget.byId('display').setUrl('/commerce/item_group_content.html');" 
I wonder how to manage submitting the form of 
"/commerce/item_group_content.html" such that the results are showing in 
"display" again.
...
<form name="o_ShopItem" action="/commerce/item_group_content.html" 
method="post">
...

I've managed to catch the "onsubmit" event - if some <input 
type="submit"> is pressed:
...
                dojo.event.connect(display.domNode, "onsubmit", 
'relaySubmits');
...
            function relaySubmits(evt){
                var form = evt.target;
                alert("submit "+form.name);
            }
...
But if the form is submitted by a javascript call 
"document.forms[0].submit();" I don't catch anything at all :(

So, how can I catch "submit();"-calls, and how is it going further on? 
Have I to loop over all elements of the form and concatenate the url 
myself to finally "display.setUrl(url)"?

I sense that there is a "cheaper" way ...

Thanks,
Christian



-- 
Anwendungsentwicklung

BLACKBIT interactive GmbH | BLACKBIT Viani GmbH
Ernst-Ruhstrat-Str. 6 - D-37079 Goettingen

tel.: +49-551-50675-50 - fax.: +49-551-50675-55
email: christian.thies at go-community.de

Klassische Werbung und Online-Marketing: http://www.blackbit.de
Software für Online-Marketing: http://www.go-community.de



More information about the Dojo-interest mailing list