Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Changed the jquery to this </p> <pre><code>$j(function() { $j("#dialog:ui-dialog").dialog("destroy"); $j("#shipPoints2").delegate(".delete-shipping-points", "click", function () { var xhr = new XMLHttpRequest(); var table = document.getElementById('shipPoints'); var rowCount = table.rows.length; var shippingPointsId = ""; for ( var i = 0; i &lt; rowCount; i++) { var row = table.rows[i]; var chkbox = row.cells[1].childNodes[0]; if (null != chkbox &amp;&amp; true == chkbox.checked) { shippingPointsId = shippingPointsId + chkbox.value + ","; table.deleteRow(i); rowCount--; i--; } } var url = '&lt;portlet:resourceURL id="deleteShippingPoint"/&gt;'; xhr.open("GET", url + "?shippingPointsId=" + shippingPointsId, true); xhr.send(); } ); </code></pre> <p>(Rest is the same as before )</p> <p>And JSP to this</p> <pre><code>&lt;div id="shipping-points-contain"&gt; &lt;table id="shipPoints" class="ui-widget-content" width="697"&gt; &lt;thead&gt; &lt;tr class="ui-widget-content" width="696"&gt; &lt;th class="ui-widget-header" width="395"&gt; Shipping Points &lt;/th&gt; &lt;th class="ui-widget-header" width="300"&gt; Remove &lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;c:forEach items="${shippingPoints}" var="shippingPoint"&gt; &lt;tr width="695"&gt; &lt;td with="395"&gt; ${shippingPoint.shippingPointsCity}, ${shippingPoint.shippingPointsState} &lt;/td&gt; &lt;td width="300"&gt; &lt;INPUT type="checkbox" NAME="chk" value="${shippingPoint.shippingPointsId}" /&gt; &lt;INPUT type="hidden" NAME="shipPointId" VALUE="${shippingPoint.shippingPointsId}" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/c:forEach&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;table id="shipPoints2" class="ui-widget" width="697"&gt; &lt;tr width="695"&gt; &lt;td width="395"&gt;&lt;a href="#" id="add-shipping-point"&gt; Add Shipping Point &lt;/a&gt;&lt;/td&gt; &lt;td width="300"&gt;Click &lt;a href="#" id="delete-shipping-points"&gt; &lt;img src="&lt;%= request.getContextPath() %&gt;/images/delete.gif" /&gt;&lt;/a&gt; remove checked shipping points&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; </code></pre> <p>And at least I'm not getting any syntax errors, the page displays properly and add still works, but the delete is not triggerred when I click the image, so the event binding isnt taking yet ......</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload