I have a page with two forms on form1 and form2.
Warp is placed inside the form2.
When I refresh a warp (warp.refresh) the form1 submits instead of form2!?
Is it that warp works only with the first form in forms collection (forms[0] )?
Is there a way to set an action form for the warp to avoid situation above?
Thanks.
Hi,
That is correct. WARP can handle only single form on page and that form is forms[0]. I think (though, not sure 100%) that dot-net architecture assumes only single form.
If you want to use another form, then the only solution for you,- is hack into logic of ig_shared.js (no support in case of misbehavior). Better you look at its implementation.
To change form only for CallBackManager you may override getCBManager member. To change form for all controls, you may override getForm member. That script block should be located before <script >init...</script> blocks of controls, but after <script src=...><script>. For example, it can be first object in asxp <form>.
Below are both examples:
<script type="text/javascript"> ig_shared.getForm = function() { return document.forms[1]; }</script>
<script type="text/javascript"> ig_shared._my_old_CBManager = ig_shared.getCBManager; ig_shared.getCBManager = function(form) { ig_shared._my_old_CBManager(document.forms[1]); }</script>
Thanks Viktor, the first example did the job.
Cheers