Whats the efficient way to write ECMA script to redirect to a provided url | Community
Skip to main content
thatsmeadarsh
Level 3
October 21, 2021

Whats the efficient way to write ECMA script to redirect to a provided url

  • October 21, 2021
  • 1 reply
  • 1908 views

In one of the OR step in my workflow I want to bring the annotate function for users. When the user click the annotate option I would like to redirect to the 'mnt/overlay/dam/gui/content/assets/annotate.html' appended with the payload. whats the easiest way to bring page redirect. Do I need to call any sling service from the script.

 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SantoshSai
Community Advisor
Community Advisor
October 25, 2021

Hi @thatsmeadarsh 

 

You may implement some custom JavaScript script which contains code to redirect url.

eg. using 

window.location and window.location.href

Regards,

Santosh

https://www.techinnovia.com/blog/

Santosh Sai
thatsmeadarsh
Level 3
October 25, 2021

Thanks for your response but how do I get the payload in external JS.

SantoshSai
Community Advisor
Community Advisor
October 25, 2021

Hi @thatsmeadarsh 

 

For getting payload recommended way to implement some Services or Servlet and/or pass it to the script if needed otherwise you can redirect in servlet itself.

 

Regards,

Santosh

Santosh Sai