Page 1 of 1

Appreciate help in redirection after custom dialog box butto

Posted: Fri Mar 10, 2017 12:35 pm
by joinnavdev
Hi All,

Have 2 textfields to change the password after updating the password want to display below dialog box then should be redirected to logoutfinal page...but without dialog box page is getting redirected.....Appreciate the help in resolving the issue

With alert its working but I want my own dialog box.....

<div class=dlgBox id=dlgBox>
<div class=dlgHeader>
SmartRecruit Alert
<button class=close onClick=document.getElementById('dlgBox').style.display='none'>X</button>";
</div>

<div class=dlgBody><b>
Password has been UPDATED.........
</b></div>

<div class=dlgFooter>
<button onClick=document.getElementById('dlgBox').style.display='none'>OK</button>

</div>
</div>
header('Location: logoutfinal.php');
exit;

Thanks,
Nick

Re: Appreciate help in redirection after custom dialog box b

Posted: Tue May 01, 2018 12:55 pm
by rick.emmet
Hey Nick,
There is a simple JS function you can use:

<script>window.location.replace("logoutfinal.php");</script>

Hope that helps.
Rick