0

I have use jquery & bootstrap in jsp page. I need to set value c:set tag using jquery/JavaScript. Here is my c:set tag:

<c:set var="dialog_uomid_c"  /> 

Here is my JavaScript function I tried but value is not set

function setValue(){
  $("#dialog_uomid_c").val("Test");
}

Please help me set up value to dialog_uomid_c from function setValue

Enamul Haque
  • 4,789
  • 1
  • 37
  • 50
  • 2
    Isn't `` a preprocessor tag? If so that happens on the server. javascript cannot access that. – Taplar Jun 14 '19 at 18:42
  • Possible duplicate of [Access Java / Servlet / JSP / JSTL / EL variables in JavaScript](https://stackoverflow.com/questions/3832792/access-java-servlet-jsp-jstl-el-variables-in-javascript) – Jasper de Vries Jun 15 '19 at 07:47
  • Your other question (https://stackoverflow.com/questions/56602195/select-option-not-selected-in-the-cchoose-in-bootstap) is based on the same misconception. JSTL / EL is processed on the server side, JavaScript on the client side. So you can only use the server side code to generate / render JavaScript. You cannot use JavaScript to manipulate what already has happened on the server side. If you need JS at the server side you need to do a new (Ajax) request. – Jasper de Vries Jun 15 '19 at 07:53

0 Answers0