Dojo - dijit.dialog -


here's flow of problem: have 1 modal dialog, when open new dialog, open contentone.jsp inside modal dialog. when click on link on contentone.jsp, modal dialog refreshes , open contenttwo.jsp href reference. close dialog. when open dialog again, open contenttwo.jsp not contentone.jsp. tried destroydescendants, destroyrendering.... didn't work.

i have header has link open modal dialog following:

<div style="position: relative;right: 50px; top: 15px;">      <a onclick="dijit.byid('selectequipmentinfo').show(); return false;"            href=""       />add equipment</a>  </div> <%-- start equipment info dialog link --%>     <div id="selectequipmentinfo" style="display:none;" name="selectequipmentinfo" dojotype="dijit.dialog" draggable="false" title="select equipment">     <div style="width:870px; height:400px; padding: 10px; overflow-y:auto;" href="">          <%@ include file="../../storeinfoarea/productfamilydisplay.jspf"%>      </div>     </div> 

this should open modal dialog. inside productfamilydisplay.jspf, have item linked jsp page on 'href' following

 <div id="productfamily" class="productfamilycontainer"> <div id= "prdctfamilyrow" class="productfamilycolumn"> <c:foreach  var="equipmentinfo"    items="${equipmenttestlist}" varstatus="status"> <a href="${equipmentmodelsviewurl}"><c:out value="${equipmentinfo.value}" /></a><br />      </c:foreach> </div> 

this render on same modal dialog, , it's being controlled javascript:

  <script type="text/javascript"> dojo.addonload (function(event){     dojo.connect(dijit.byid('selectequipmentinfo'), 'onclick', clicked); });     var clicked=function(event) {            var dialog=dijit.byid('selectequipmentinfo');         var contentnode=dialog.domnode;         var node = event.target;         var attrid = dojo.attr(node, "id");          if (attrid =="dijitcloselink" || attrid == "dijitcloseimg") {             dialog.set('href','');            } else {         if("a" == node.nodename.tolowercase()){             dialog.href=node.href;             dialog.refresh();             dojo.stopevent(event);         }          }     };   </script> 

i not able locate code destroy dialog. try given below code. put code in div creating dialog.

   dojo.connect(selectequipmentinfo, "hide", function(e){                 dijit.byid("selectequipmentinfo").destroy();              }); 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -