javascript - Spring MVC modelandview object returned or not? -


i have method instantiating clicking on link in jsp page as

html:

<div class="panel accordion clearfix" id="dispdir">     <script type="text/javascript">         window.onload = function() {             //showdirectorysegment(${s3directorylist},"folder",null);             showbucketlist(${s3bucketlist});         };     </script> </div> 

javascript:

function showbucketlist( bucketlist ) {      markup = "<div class=\"clearfix\">";     $("#dispdir").append(markup);     ( var = 0; < bucketlist.length; i++ ) {          var bid = "bucket_"+bucketid;          var key = bucketlist[i].replace(/ /g,"+");          var uri = "/accountingreports?bucketname=" + key;          var res = encodeuri(uri);          markup = "<div class=\"well clearfix\" style=\"background-color:#a5ffed;font-size:15px\">";          markup += "<a href='" + res + "' style=\"text-decoration:none\" id='" + pid + "'>"&nbsp;&nbsp;" + bucketlist[i] + "</a></div>";          $("#dispdir").append(markup);             $("#" + bid).on("click",fetchdirectory());          bucketid++;     }     $("#dispdir").append("<div>"); } 

now, when ever link clicked call server , server return object ${s3directorylist}. how check whether object returned or not.

what syntax ?

you need write script in jsp file:

<script type="text/javascript">         window.onload = function() {             var object = '${s3bucketlist}'; //this variable contain value returned server                 //check object null             //showdirectorysegment(${s3directorylist},"folder",null);             showbucketlist(${s3bucketlist});         }; </script> 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -