//Sending Data Using Get Method <script type="text/javascript"> function sendResponseGet(url, extradata, success) { var form = $('<form action="' + url + '" method="get">' + '<input type="text" name="message" value="' + extradata + '" />' + '<input type="text" name="transid" value="' + success + '" />' + '</form>'); form.submit(); } // Sending Data Using Post Method function sendResponsePost(url, extradata, success) { var form = $('<form action="' + url + '" method="post">' + '<input type="text" name="message" value="' + extradata + '" />' + '<input type="text" name="transid" value="' + success + '" />' + '</form>'); form.submit(); } </script> JSP Code <button class="btn btn-primary custom-btn" onclick='sendResponseGet("<%=uri%>"," <%=message%>","success")'>Send Oxigen Response GET</button> <hr> <button class="btn btn-primary custom-btn" onclick='sendResponsePost("<%=uri%>", "<%=message%>","success")'>Send Oxigen Response POST</button>
Thursday, January 21, 2016
Reponse.Redirect with form data in java
Subscribe to:
Post Comments (Atom)
Spring Boot 3 : JWT with SecurityFilterChain, AuthorizeHttpRequests, RequestMatchers
pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0...
-
Installation of MongoDB The executable file needs to be downloaded from: https://www.mongodb.com/download-center?jmp=nav#communit...
-
Form to add multiple rows: <! DOCTYPE html> <%@ page language = "java" contentType = "text/html; cha...
No comments:
Post a Comment