All, I would really be grateful if someone can shed light on my issue. My parent page contains a trigger to open a jqModal window. The modal window itself contains a button which when clicked on will rewrite the trigger on the parent page. I need to do this because my real-world page has a table of statuses that link to modal windows which changes the status (and hence the modal window trigger) according to user input.
I have put together a simple example below, can someone tell me what I'm doing wrong? Right now the modal window just hangs when I click on the submit button. Thank you very very much! Parent Page: ------------ <head> ... <script type="text/javascript"> $().ready(function() { $('#dialog').jqm({ajax: '@href',modal:true,trigger: 'a.testModal'}); }); </script> </head> <body> <div id="refreshme"> <a href='modal.html' class='testModal'>Open Modal Window</a> <div id='dialog' class='jqmWindow'> blahblah... </div> </div> </body> Modal Page ----------- <form method="post" id="form1"> Click button to refresh base page<br/> <input type='submit' id='savebtn' value='save'><input type='submit' id='cancelbtn' class='jqmClose' value='cancel'> </form> <script type="text/javascript"> $().ready(function() { $("#form1").submit(function(){ parent.$('#refreshme').empty().append("<a href='modal.html' class='testModal'>Open Modal Window Dynamic</a><div id='dialog' class='jqmWindow'>blah</div>"); return false; parent.$('#dialog').jqm({ajax: '@href',modal:true,trigger: 'a.testModal'}); }); }); </script>