{"action":"created","issue":{"url":"https://api.github.com/repos/nabinked/NToastNotify/issues/48","repository_url":"https://api.github.com/repos/nabinked/NToastNotify","labels_url":"https://api.github.com/repos/nabinked/NToastNotify/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/nabinked/NToastNotify/issues/48/comments","events_url":"https://api.github.com/repos/nabinked/NToastNotify/issues/48/events","html_url":"https://github.com/nabinked/NToastNotify/issues/48","id":361630581,"node_id":"MDU6SXNzdWUzNjE2MzA1ODE=","number":48,"title":"Show message after ajax redirect?","user":{"login":"djordjedjukic","id":6117988,"node_id":"MDQ6VXNlcjYxMTc5ODg=","avatar_url":"https://avatars3.githubusercontent.com/u/6117988?v=4","gravatar_id":"","url":"https://api.github.com/users/djordjedjukic","html_url":"https://github.com/djordjedjukic","followers_url":"https://api.github.com/users/djordjedjukic/followers","following_url":"https://api.github.com/users/djordjedjukic/following{/other_user}","gists_url":"https://api.github.com/users/djordjedjukic/gists{/gist_id}","starred_url":"https://api.github.com/users/djordjedjukic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djordjedjukic/subscriptions","organizations_url":"https://api.github.com/users/djordjedjukic/orgs","repos_url":"https://api.github.com/users/djordjedjukic/repos","events_url":"https://api.github.com/users/djordjedjukic/events{/privacy}","received_events_url":"https://api.github.com/users/djordjedjukic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-19T08:15:23Z","updated_at":"2018-09-20T07:10:16Z","closed_at":null,"author_association":"NONE","body":"Hi, is it possible to show message if I redirect to action from ajax. Here is the code:\r\n\r\nC# code\r\n`publicIActionResult Ajax()\r\n{\r\n     toastNotification.AddSuccessToastMessage(TextResource.Info_SaveSuccess);\r\n     return this.Ok(new { redirect = true, url = \"/User/EditProfile\" });\r\n}\r\n`\r\nJS code\r\n`\r\n$.ajax({\r\n        url: $this.attr('action'),\r\n        type: 'post',\r\n        data: formData,\r\n        dataType: 'json',\r\n        statusCode: {\r\n            200: function (data) {               \r\n                if (data.redirect) {\r\n                    if (data.url) {\r\n                             window.location = data.url;\r\n                    } else {\r\n                        window.scrollTo(0, 0);\r\n                        window.location.reload();\r\n                    }\r\n                }\r\n            }\r\n        },\r\n`"},"comment":{"url":"https://api.github.com/repos/nabinked/NToastNotify/issues/comments/423066309","html_url":"https://github.com/nabinked/NToastNotify/issues/48#issuecomment-423066309","issue_url":"https://api.github.com/repos/nabinked/NToastNotify/issues/48","id":423066309,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzA2NjMwOQ==","user":{"login":"djordjedjukic","id":6117988,"node_id":"MDQ6VXNlcjYxMTc5ODg=","avatar_url":"https://avatars3.githubusercontent.com/u/6117988?v=4","gravatar_id":"","url":"https://api.github.com/users/djordjedjukic","html_url":"https://github.com/djordjedjukic","followers_url":"https://api.github.com/users/djordjedjukic/followers","following_url":"https://api.github.com/users/djordjedjukic/following{/other_user}","gists_url":"https://api.github.com/users/djordjedjukic/gists{/gist_id}","starred_url":"https://api.github.com/users/djordjedjukic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djordjedjukic/subscriptions","organizations_url":"https://api.github.com/users/djordjedjukic/orgs","repos_url":"https://api.github.com/users/djordjedjukic/repos","events_url":"https://api.github.com/users/djordjedjukic/events{/privacy}","received_events_url":"https://api.github.com/users/djordjedjukic/received_events","type":"User","site_admin":false},"created_at":"2018-09-20T07:10:16Z","updated_at":"2018-09-20T07:10:16Z","author_association":"NONE","body":"I am already using it on that way, but I don't like it. If I set timeout 1-2 seconds message close to fast and if I set timeout more the 3 seconds it looks that redirects takes too long. I will try to use some other solutions.\r\nThanks any way, great work! :)"}}
{"actor":{"display_login":"djordjedjukic"}}