ajax - How can i show asynchronously gotten information in a dialog box using dojo and struts2? -
i'm building code, using struts2 , dojo ajax support. i'm trying launch dialog box when link used. dialog box should contain information gotten asynchronously when said link cliked.
here code:
<s:url id="buscar_usuarios_url" value="/buscar_usuarios.action"/> <li id="menu_buscar_usuarios"><sx:a targets="buscar_usuarios_dialog" href="%{buscar_usuarios_url}">buscar usuarios</sx:a></li> this piece of code gets html need show in dialog box i'm using in script:
$(document).ready(function() { $("#menu_buscar_usuarios").live('click', function() { $("#buscar_usuarios_dialog").dialog({ modal:true }); }); } the problem have when click < sx:a > tag, information gotten dialog box doesn't show up. whereas when click in < li > outside < > dialog box shown information not updated.
i tried give id "menu_buscar_usuarios" < sx:a > tag doesn't work either, should do?
i fixed it. gave < sx:tag > id "menu_buscar_usuarios" , instead of use live() function, deprecated, used on() function, this:
$(document).ready(function() { $("#menu_buscar_usuarios").live('click', function() { $("#buscar_usuarios_dialog").dialog({ modal:true }); }); } thank all
Comments
Post a Comment