Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First, I would suggest that you change your structure as you are using AJAX hardly at all (you only use one on load and that's it, and that is not different than passing all those values from the very beginning from the action). As you only have 3 values to pass, is fairly easy to capture them with <code>jQuery("#myid").val()</code> and pass them with <code>jQuery.ajax</code>. something like</p> <pre><code>&lt;s:button value="Allocate Me!!!" onclick="allocating_you()"/&gt; </code></pre> <p>and then</p> <pre><code>function allocationg_you(){ var val1 = jQuery("#value1").val(); var val2 = jQuery("#value2").val(); var val3 = jQuery("#value3").val(); jQuery.ajax({ url: "allocator", data: "val1=" + val1 +"&amp;val2=" + val2 + "&amp;val3=" + val3 + "&amp;r=" //dont forget to add a random number success: function(data){ jQuery("#mytable").html(data).load(); } }); } </code></pre> <p>finally, you should reduce the ajax refreshment to the minimun necessary, as it will be easier to mantain and to give aesthetics. so for example your template should be divided like this</p> <pre><code>&lt;your form&gt; &lt;your table header&gt; &lt;div id="mytable"&gt; </code></pre> <p>with this template you would only have to refresh the actual content and everything else will remain intact (true AJAX), so in your JSP response for your AJAX call there should be only the iterator part. you will even be able to create the table with a scrollbar and a static header, only needing to put some matching sizes in your ajax cells along with the table tag.</p> <p>Hope this helps you. If you manage to crack this you will be able to do wonders. jQuery + Struts2 + (seems that you are not using Hbernate, but oh well) it's a monstrous combination.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

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