Tom, it depends on how you are processing the form, I usually set up a
return function to handle it, not observer:

Dialog.confirm("<br><div id=\"login_popup\"><\/div>",
{windowParameters: {className:"alphacube", width:300, height:235},
okLabel: "proceed", ok: Login.doLogin });

But in a PWC, you can set up additional buttons to do the onclick event to
handle your processing.  onDestroy is also useful if oyu choose to go that
route.  Do not set win to null though, PWC will handle destruction of a
window.

Felix.


On 11/25/06, Tom Cowin <[EMAIL PROTECTED]> wrote:

Is there a formula for successfully processing a form within a window,
where the form is retrieved by an AjaxRequest? In my own convoluted way,
I have it working to the point that the form is displayed, then handled
and submitted properly, but I'm not able to capture (or block) the
return from the form submission. This is within the context of the
symfony environment.

<script type="text/javascript">
   var win;

function test()
{
       var currentTime = new Date();
       var id = "window_id_" + currentTime.getTime();
       win = new Window(id, {className: "dialog", width:450, height:680,
zIndex: 100, title: "create customer"});
       win.setAjaxContent("/index.php/customer/createJSW", {method:
'get'}, true, true);
}

myObserver = {
           onDestroy:
               function(eventName, win1) {
                   if (win1 == win) {
                       win = null;
                       self.location.reload();
                       Windows.removeObserver(this);
                       }
                   }
               }
       Windows.addObserver(myObserver);
   </script>


   <a class="ancillary" href="#" onclick="test();return false;">[add
customer]</a>

I'd also like to be able to reload the primary window once the js window
is closed/destroyed - I assume the best way to handle this is via an
observer?

_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

Reply via email to