Redirect to a url from a client script

sbracebridge
Giga Contributor

Hi Folks,

I am currently working on a catalog item where my client script needs to trigger an alert to confirm OK or Cancel.

Cancel should redirect the user elsewhere. I see that window.location does not work in the service portal

It works perfectly on the back end but not on the portal.

var okCancel = confirm('The message ');

if(okCancel == true)

{

return false;

}

else

{

window.location = theURLitNeedstoGoto;

}

Thank you.

4 REPLIES 4

Shishir Srivast
Mega Sage

Please check if this helps : Can we redirect using client script


Patrick Fedigan
Giga Guru

Hello Sean,



Did you try top.window.location?



How can I redirect a user with an onChange client script?



Cheers,


This worked for my case.


Cheers