JqueryUI: a link and a modal form, how can show the form above the page where the link is?
Hi,
i have link that shows a modal form, but it shows the dialog in a new page..
I want to show the modal form above the page where is the link.
What should i do?
This is the link:
- <a href="/frontend_dev.php/mensaje_nuevo?receptor=1&tipo=0&estado=0">Enviar mensaje</a>
And this shows the modal form:
- <script type="text/javascript">
- $(function() {
- $("#dialog").dialog({ height: 223, width: 373, top: 160, left: 439, modal: true });
- });
- </script>
-
- <form id="dialog" action="<?php echo url_for('mensaje/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
-
- <table>
-
- <?php
- // muestra el formulario
- echo $form
- ?>
- <tr>
- <td> </td>
- <td>
- <input type="submit" value="Enviar" />
- <?php echo link_to('Cancelar', $sf_request->getReferer()) ?>
- </td>
- </tr>
- </table>
- </form>
Regards
Javi