Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

indendation
Source Link

Calling Use JavaScript Variable in Java

I want to calluse this below variable reqID into my java code, and iI want to submit this prompt with this value. And that value i want to use in update.

function approveReset(){
 var reqID = prompt("Enter Request ID : ", "Request ID");
 <%
 try{
 -- Here i want to call my variable reqID--
 PreparedStatement ps_approve_req = conn.prepareStatement("<Some update statement>");
 } } catch (Exception e) {
 System.out.println(e);
 System.out.println("Some issue happened hence rolling back.");
 conn.rollback();
 }
 %>
}

Calling JavaScript Variable in Java

I want to call this below variable reqID into my java code, and i want to submit this prompt with this value.

function approveReset(){
 var reqID = prompt("Enter Request ID : ", "Request ID");
 <%
 try{
 -- Here i want to call my variable reqID--
 PreparedStatement ps_approve_req = conn.prepareStatement("<Some update statement>");
 } catch (Exception e) {
 System.out.println(e);
 System.out.println("Some issue happened hence rolling back.");
 conn.rollback();
 }
 %>
}

Use JavaScript Variable in Java

I want to use this below variable reqID into my java code, and I want to submit this prompt with this value. And that value i want to use in update.

function approveReset(){
 var reqID = prompt("Enter Request ID : ", "Request ID");
 <%
 try{
 -- Here i want to call my variable reqID--
 PreparedStatement ps_approve_req = conn.prepareStatement("<Some update statement>");
 }  catch (Exception e) {
 System.out.println(e);
 System.out.println("Some issue happened hence rolling back.");
 conn.rollback();
 }
 %>
}
Post Closed as "Duplicate" by Community Bot
Source Link

Calling JavaScript Variable in Java

I want to call this below variable reqID into my java code, and i want to submit this prompt with this value.

 function approveReset(){
 var reqID = prompt("Enter Request ID : ", "Request ID");
 <%
 try{
 -- Here i want to call my variable reqID--
 PreparedStatement ps_approve_req = conn.prepareStatement("<Some update statement>");
 } catch (Exception e) {
 System.out.println(e);
 System.out.println("Some issue happened hence rolling back.");
 conn.rollback();
 }
 %>
 }
default

AltStyle によって変換されたページ (->オリジナル) /