Microsoft Edge node.js重定向没有做任何事情

时间:2017-02-17 11:50:40

标签: javascript node.js internet-explorer microsoft-edge

我有一个人们可以放心的网站,它适用于Chrome,Firefox但是在使用Edge或IE时我遇到了问题。 当我首先尝试登录时没有问题,我可以在几个问卷之间导航,但是当我点击开始一个时,表单消失,只有登录页面的背景可见。控制台中没有重定向,甚至没有错误消息。

我尝试过在线搜索,但由于我不太确定有什么问题,我很难找到任何有用的东西。

我们的网站运行在Node,javascript,jquery,ajax,express和ejs上。 我的ejs:

<body >
    <div class="container">
        <div id='divDialogAdorner'>
            <div id='divDialog' class="jsClassDialog colorBG_Lightblue" style="display:none;">
                <div id='divAutologinInProgress' class='colorBG_Darkblue' style='display:none;'>
                    <h1>&nbsp;</h1>
                    <h1>Automatically logging in. . .</h1>
                    <img src="images/controls/ajax-loader.gif" width="46" height="46" alt="Processing..." />
                    <br/>
                    <h3>Click to abort the login process</h3>
                </div>
                <div id='divDialogHeading' class='colorBG_Darkblue'>Settings for your One2Ten App <small><small><small>(versie 1.1.04)</small></small></small></div> <!-- /divDialogHeading -->
                <div id='divDialogBody'>
                    <form id='one2ten_loginForm' class='form-inline' method="post" action="/one2ten_login">
                        <fieldset id='fieldsCredentials'> 
                            <label id='labelEmail' for="email" class="sr-only">Email address</label>
                            <input id="email" name="email" type="email" class="jsRememberField form-control input-sm input-inline" autocomplete="off" placeholder="Email address" required value=''>
                            <label id='labelPassword' for="password" class="sr-only">Password</label>
                            <input id="password" name="password" type="password" class="jsRememberField form-control input-sm input-inline" autocomplete="off" placeholder="Password" required>
                            <button id='buttonSignIn' class="btn btn-sm btn-default btn-inline" type="button">Sign in</button>
                            <button id='buttonSignOut' class='btn btn-sm btn-warning btn-inline' type="button" style="display:none;">Sign out</button>
                            <span id='spanRememberMe' class='pull-right block-inline'>
                                <label for="rememberMe">
                                    &nbsp;
                                    <input id='rememberMe' name='rememberMe' type="checkbox" class='jsRememberField input-inline' checked value='on'>
                                    <span id='labelRememberMe' class='text-mutedXXX'>Remember my credentials</span>
                                </label>
                            </span>
                        </fieldset> <!-- /fieldsCredentials -->
                        <hr/>
                        <div id='divSettings'>
                            <div id='divSettingsObstructor' class='colorBG_Lightblue'>
                                <h1>Sign in first, please.</h1>
                                <h3>You can select your One-2-Ten App settings<br/>after authentication.</h3>
                            </div>
                            <div id='divSettingsLoading' class='colorBG_Darkblue' style='display:none;'>
                                <h1>Retrieving the Data</h1>
                                <img src="images/controls/ajax-loader.gif" width="46" height="46" alt="Processing..." />
                                <h3>Just a moment, please...</h3>
                            </div>
                            <table> 
                                <tr>
                                    <td>
                                        <div id='divSettingsList' class="list-group">
                                            <button id='btnSettingsAppTypeXXX' type="button" class="list-group-item">
                                                <p class="list-group-item-heading">App Mode</p>
                                                <p class="list-group-item-text">What to use the app for...</p>
                                            </button>
                                            <button id='btnSettingsProjectXXX' type="button" class="list-group-item">
                                                <p class="list-group-item-heading">Questionnaire</p>
                                                <p class="list-group-item-text">The questionnaire to use...</p>
                                            </button>
                                            <button id='btnSettingsLocationGroupXXX' type="button" class="list-group-item">
                                                <p class="list-group-item-heading">Location</p>
                                                <p class="list-group-item-text">Where to use the app...</p>
                                            </button>
                                            <button id='btnSettingsLocationXXX' type="button" class="list-group-item">
                                                <p class="list-group-item-heading">Placement</p>
                                                <p class="list-group-item-text">Which named spot...</p>
                                            </button>
                                            <button id='btnSettingsDomainXXX' type="button" class="list-group-item">
                                                <p class="list-group-item-heading">Domain</p>
                                                <p class="list-group-item-text">Preselect a line of questions...</p>
                                            </button>
                                            <button id='btnSettingsQuestionsXXX' type="button" class="list-group-item">
                                                <p class="list-group-item-heading">Questions</p>
                                                <p class="list-group-item-text">The questions to include...</p>
                                            </button>
                                            <button id='btnSettingsTimeframeXXX' type="button" class="list-group-item">
                                                <p class="list-group-item-heading">Timeframe</p>
                                                <p class="list-group-item-text">Which time period...</p>
                                            </button>
                                            <button id='btnSettingsSubmitXXX' type="button" class="list-group-item">
                                                <p class="list-group-item-heading">Confirm</p>
                                                <p class="list-group-item-text">Accept settings and start...</p>
                                            </button>
                                        </div>
                                    </td>
                                    <td>

我的app.js:

app.post('/universal_login', function(req, res) { 
var app_v2 = require('./new_app/app_v2.js');
var theFields = {};
for (var aField in req.body) { theFields[aField] = req.body[aField]; }

var theAppObject = app_v2.newApp({type: req.body.AppType, values: theFields});
if ((typeof (theAppObject) == 'string') || (!(theAppObject.start))) {
    theAppObject = null; theFields = null; app_v2 = null;
    res.render('new_login.ejs', { status_message: theAppObject, status_type: formatStatusType('error'), autoLogin: 'off' }); 
} else {
    function appCallback(params) { 
        theAppObject.stop(); theAppObject = null; theFields = null; app_v2 = null;          
        if ((params) && (params[1]) && (params[1].projectId) && (params[1].projectId) != '') { res.render(params[0],params[1]); } 
        else { res.render('new_login.ejs', { status_message: params, status_type: formatStatusType('error'), autoLogin: 'off' }); }
    }
    theAppObject.start(appCallback);
}

})

0 个答案:

没有答案