开发者

Symfony: question about jq_link_to_remote()

开发者 https://www.devze.com 2023-01-02 02:25 出处:网络
i have a template with this below to show a dialog when the link开发者_运维知识库 is clicked:

i have a template with this below to show a dialog when the link开发者_运维知识库 is clicked:

<div id="myDialog">

</div>

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

                                       'update' => "$('#myDialog')",

                                        'complete' => '$("#myDialog").dialog({ height:530 });
                                    ));

When i click the link, i get in Firebug the message:

$("#myDialog") is null

and no dialog appears.

Any idea?

Regards

Javi


This below now is working. I'm loading another javascript framework, so i have to replace "$" by "jQuery".

echo jq_link_to_remote('Enviar mensaje', array(

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

              'update' => 'myDialog',

              'complete' => "jQuery('#myDialog').dialog()"
            ));
0

精彩评论

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

关注公众号