views:

13

answers:

1

Hi,

I have the link below that executes the action message/new which shows a form inside a jqueryui modal dialog.

<div id="myDialog">

</div>

echo jq_link_to_remote('Enviar mensaje', array(

             'url' =>
'mensaje/new?receptor='.$miembro->getId().'&tipo=0&estado=0',

             'update' => 'myDialog',

             'complete' => "jQuery('#myDialog').dialog({ width:375,
height:220, top:123,

                                                 resizable:false,
modal:true, autoOpen: false });

jQuery('#myDialog').dialog('open')"
                                     ));

The point: if there are submit errors the form is not showed inside the dialog form but in a empty page (mensaje/create)..

Any idea?

Javi

A: 

I would like to give you a code example, but it is extremely hard to follow what you are trying to do with the poorly formatted post above.

If you want to keep the user on the page you will need to submit your data via AJAX. Check out the jQuery AJAX docs. It appears you are using PHP, this tutorial for submitting via AJAX with jQuery and PHP may be useful as well.

Nate Pinchot