0

I have a div value for I am getting dynamically using js. jSP:-

<div id="lp" ></div> 
       <c:forEach var="map" items="${obj.dataEmployee}" varStatus="status">
                          <c:if test="${map.key==10001}">

JS CODE:-

 var drop = {  
empid1 :empid }
$.ajax({
        type: "GET",
        url: "new",
        data: drop,
        success: function (data) {
            // do something.
            //out.print("done");
            $('#lp').html(data);
            //alert( data)
        },

I want to access this value using jstl as I Need it in existing JSTL code in place of 10001.Have tried a lot of approaches but to no avail.What should I do?

Raaj
  • 31
  • 5
  • Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. – Yassin Hajaj May 23 '16 at 05:25
  • @Yasin ...in I want to compare map.key with div id="lp" 's value that I am getting from ajax function. This condition I require for my further functionality – Raaj May 23 '16 at 05:29

1 Answers1

0

It may be javascript error in your code. Please check in your browser developer console using F12 key. Look console and check error.

Update: If there is no error in javascript.

Jstl is server side and the div javascript is client side. Client side will run after server side. So, you cannot get div value to jstl.

  • no error with js code.I just need this div value in my jstl code above.Value is coming fine.just want to know the approach – Raaj May 23 '16 at 02:56