开发者

Question about a dialog form and submit errors

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜