0

I need your help redirecting the page which has embedded form and if the element is shown, I want it to redirect to a certain page. Thank you!

<script>
if ( receipt number (element) is shown it will redirect below ) {
  window.location.href = "https://www.example.com";
}
</script>
Dave
  • 3,073
  • 7
  • 20
  • 33
  • Can you please elaborate the question, currently it hardly makes any sense. – Teemu Mar 14 '22 at 06:01
  • IF you need to check whether the script is executing inside an IFRAME - you can test for `window !== window.parent`, or https://stackoverflow.com/a/326076/5962802 – IVO GELOV Mar 14 '22 at 07:53

0 Answers0