Here is the code below which i am using to submit my form. When i click the link, the new window is behaving as current window and the Current window is behaving as new action link. How can i stop this behaviour.
I am reading the linkURL in a java class from JVM parameters.
<form action="<c:out value='${config.linkURL}'/>" method="GET" id="myForm"> <a href="#" target="_blank" id="myLink"><bean:message key="link.cardholder.info"/></a> <input type="hidden" name="cardID" value="<c:out value="${config.homeSwitch}"/>" /> <script> $('#myLink').on('click', function() { window.open('<c:out value="${config.linkURL}"/>',"title").focus();}); </script> </form> when i tried here the hidden values are not passing along with the url because of not calling submit() function. Any possible way to call submit function.
1 Answers
Answers 1
This link will provide you with detailed info about the HTMLFormElement.
This link will explain what the submit method of the HTMLFormElement is.
Something like:
myForm.submit();
0 comments:
Post a Comment