I'm trying to show an alert before a page redirect (after a form submission).
I tryed every possible scenario but it seems that the callback function (wich actually performs the redirect) is always executed before the window.
As a last option I tryed
activeAjaxRequest = false;
where noPermanentLogin just:
'Radalert is called from the client!'
, 330, 180,
//window.location.href = args
Now when I first load the page the RadWindow should open each time and upon clicking "OK" button the alert should fire.
Instead the alert fires and the window is not created because of:
Uncaught TypeError: Cannot call method 'radalert' of undefined
It seems that the radwindow object has not yet been instantiated but nonetheless the callbackfunction executes the same.. this is quite mindblowing to me...
In the real scenario I tryed several versions, whose behaviour (in all situations) is that the callbackfunction gets executed BEFORE the window is showed. In those cases btw the window is showed.
So I tryed in code behind:
Then I tryed
RadWindowManager.RadAlert("Testina", Nothing, Nothing, "Totolo", "window.location.href = '" & returnUrl & "'")
And finally I tryed:
RadWindowManager.RadAlert("Testina", Nothing, Nothing, "Totolo", "redirectFunction('testurl')")
(in this last case redirectFunction calls the window redirect and is in an external JS in the page).
Why the callback function is executed even before showing the radalert?
Thanks in advance for your help