I am working on AEM 6.5 and am trying to open a new URL after form/data submission.
I have tried:
xfa.resolveNode("subEnd.subEndPage.subEndText.btnSubmitButton").execEvent("click");
xfa.host.messageBox("Thank you for completing the survey");
xfa.host.gotoURL("https://newURL");
Result: Data submits but doesn't go to new url
xfa.resolveNode("subEnd.subEndPage.subEndText.btnSubmitButton").execEvent("click")
xfa.host.messageBox("Thank you for completing the survey");
app.launchURL("https://newURL", true)
Result: Data does NOT submit but goes to URL in same tab (not a new one).
Solved! Go to Solution.
Views
Replies
Total Likes
It might be better to decouple methods that rely on the speed of external ressources or users. So instead of using one event to execute all of them use several. Put the part that happens after the submitting into the postSubmit event of the form or button and wrap the messageBox in an if-statement to make sure the following script is only executed after the modal was closed.
if (xfa.host.messageBox("Thank you for completing the survey") > 0) {
app.launchURL("https://newURL", true);
}
It might be better to decouple methods that rely on the speed of external ressources or users. So instead of using one event to execute all of them use several. Put the part that happens after the submitting into the postSubmit event of the form or button and wrap the messageBox in an if-statement to make sure the following script is only executed after the modal was closed.
if (xfa.host.messageBox("Thank you for completing the survey") > 0) {
app.launchURL("https://newURL", true);
}
I attempted what you suggested and placed the opening of the new URL to the postSubmit event of the button and nothing happend. The event did not fire.
Views
Replies
Total Likes
I had a window.print() that was causing the new window to not be opened properly, I moved this to after the window.open() and now it opens the window as expected.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies