Question

I have a site (page source included at the bottom), the first time a user using Windows 8.1 / IE11 visits the page it loads correctly, but when they click the button it just spins forever, if they refresh it works fine, or if they visit the page for the first time with DevTools open it works too. This page works in all browser/OS conbinations except Windows 8.1/IE11, also, Fiddler works...

I have no Console.log statements. Since I can't have DevTools open and see the page spin-wait, I am not sure how to debug/fix this issue.

Anyone seen this before, or able to suggest a way to debug it? Although both the Post/Get return "View()" in one piece of code, that was my way of ruling out paging errors. From what I can tell, the server isn't being hit with the call. The browser just spins (I left it for 30 minutes one time).

C#:

public ActionResult Introduction()
{
    if (Request.HttpMethod == "POST")
    {
        var user = DataRepository.GetUser(WebSecurity.CurrentUserName, TaskID);
        if (user.CurrentStep == 3)
        {
            user.CurrentStep++;
            DataRepository.SetUserStep(WebSecurity.CurrentUserId, user.CurrentStep);
        }
        return GetView(user);
    }

    Task task = DataRepository.GetTask(TaskID);
    return View(task);
}

I have also tried:

[HttpGet]
public ActionResult Introduction()
{
    return View(task);
}

[HttpPost]
[ActionName("Introduction")]
public ActionResult IntroductionHttpPost()
{
    return View();
}

View:

<!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
        <title>Introduction</title>
        <script type="text/javascript">
            document.createElement('header');
            document.createElement('section');
            document.createElement('article');
            document.createElement('aside');
            document.createElement('nav');
            document.createElement('footer');
        </script>


    </head>
    <body>
        <div class="page clearfix">
            <header>
                <div id="progress" class="clearfix">

                </div>
                <div id="title">
                    <h1>Introduction</h1>
                                </div>
            </header>
            <section id="main">


    <form action="/Task/Introduction" method="post">Welcome,    <br />
        <br />
    In this survey you will be asked to answer some questions about yourself and about the kinds of events you enjoy. It is important that you consider each question and answer honestly, we can only accept surveys that are complete and personalized to your preferences.    <br />
        <br />
        <button type="submit" class="button">Start Task</button>
    </form>
            </section>
            <footer>
            </footer>
        </div>
    </body>
    </html>
Was it helpful?

Solution

For anyone else who is having this issue, you can add a name attribute to your button and everything works as normal.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top