문제

Hi i am using display tag to display the data. on clicking on the table header link it should call the javascript and submits the page instead of navigation to it. how to do it?

도움이 되었습니까?

해결책

In the Onload of the page, seach for the sort column and add the script to submit the page as follows,

 $(document).ready(function() {
                    $('.sortable').each(function(event){ 
                     var obj = $(this).find('a').attr('href'); 
                var urltext = 'javascript:submitform("'+contextPath+'/'+obj+'\")';  
                $(this).find('a').attr('href', urltext);
            }); 
      });   
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top