I am having one hidden form
<form name="printPhysicalAnn" id="printPhysicalAnn" method="post" target='_new'>
<s:hidden name="aId" id="aId"/>
<s:hidden name="ty" id="ty" value="physical possession"/>
<input type="hidden" name="appId" id="appIdsss" value="${appId}"/>
</form>
Which is being submitted through javascript. The resultant page opens in new tab. I want to refresh the parent tab after this form is submitted. The following javascript code works perfectly fine all the browsers except Google Chrome.
var r = confirm("Are you sure you want to generate certificate");
if (r == true) {
document.printPhysicalAnn.action = root+"/RES/ann2HsiidcPhysical";
document.forms['printPhysicalAnn'].submit();
document.location =window.location;
}
Instead of
Use
or this if you want to bypass cache
Edit :
Your form isn't submitting because
_new
isn't a valid target. Use_blank
if you want it to open in a new tab/window