0

How can I redirect to another page after the alert is displayed and the user clicked on ok?

Below is the code I used

var Admin =  doc.getItemValueString("Admin");
var scriptCode = "alert('Email send to the admin: " + Admin + "')";
view.postScript(scriptCode); 

When I try to use "context.redirectToHome()" then the alert did not work again. Any idea how I can go about these or any other messagebox function?

Knut Herrmann
  • 30,880
  • 4
  • 31
  • 67
simon peter
  • 403
  • 8
  • 19

1 Answers1

1

Add the redirection to your client side scriptCode with window.location=URL:

var scriptCode = "alert('Email send to the admin: " + Admin + "'); window.location = 'http://www.yourNewPage.com'"; 

You can calculate the target URL in your code before and add it as a variable (like you do with "Admin").

Knut Herrmann
  • 30,880
  • 4
  • 31
  • 67