Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect after pressing OK #305

Closed
azlannohara opened this issue Mar 11, 2015 · 2 comments
Closed

Redirect after pressing OK #305

azlannohara opened this issue Mar 11, 2015 · 2 comments

Comments

@azlannohara
Copy link

First of all, I would to say kudos to Sweet Alert. Nice interface, definitely better than default.

I current using code to show the notification.

echo '<script>' ;
echo 'swal("Applicaton updated !", "", "success"); ; ';  
echo 'location.href = "summary_pc.php" ; ';
echo '</script>'; 

The problem was, I did not get a chance to click the "OK" button and the page already redirected.

Is there a way for me to redirect the page after I click "OK" button ? And I would love to maintain it in PHP

@t4t5
Copy link
Owner

t4t5 commented Mar 15, 2015

I'm afraid it's very hard to tell what you're doing wrong unless you post your code. :)

Here's an example of simple redirecting with JavaScript that you should be able to use: #199

@t4t5 t4t5 closed this as completed Mar 15, 2015
@azlannohara
Copy link
Author

Here is my code:

echo '<script>' ;
echo 'swal("Applicaton updated !", "", "success"); ; ';  
echo 'location.href = "summary_pc.php" ; ';
echo '</script>'; 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants