0

FF、IE 8、IE 9、chromeで問題なく送信できるフォームがあります。

サファリ(ウィンドウズ)では送信しますが、私のモデルは空です。この動作は、ローカル開発ではなく、私の開発サイトと製品サイトでのみ発生します。ローカル開発は正常に機能します。私はここで何が間違っているのですか?

形:

<form action="/NetSite/Applications/ElectronicFileTransfer" id="TransfersSearchForm" method="post">        
    <table class="siteTable">
            <tbody>
                <tr>
                    <th style="width: 20%;">FICE</th>
                    <td style="width: 80%;"><input id="Criteria_Fice" maxlength="6" name="Criteria.Fice" size="6" type="text" value="" /></td>
                </tr>
                <tr>
                    <th>Source Email</th>
                    <td><input id="Criteria_SourceEmail" maxlength="40" name="Criteria.SourceEmail" size="25" type="text" value="" /></td>
                </tr>
                <tr>
                    <th>Target Email</th>
                    <td><input id="Criteria_TargetEmail" maxlength="100" name="Criteria.TargetEmail" size="25" type="text" value="" /></td>
                </tr>
                <tr>
                    <th>Upload From Date</th>
                    <td>

            <input class="datePicker" data-val="true" data-val-date="Invalid date specified. Date should be like MM/DD/YYYY." id="Criteria_FromDate" maxlength="12" name="Criteria.FromDate" size="12" type="text" value="" />

                        <span class="field-validation-valid" data-valmsg-for="Criteria.FromDate" data-valmsg-replace="true"></span>
                    </td>
                </tr>
                <tr>
                    <th>Upload To Date</th>
                    <td>

            <input class="datePicker" data-val="true" data-val-date="Invalid date specified. Date should be like MM/DD/YYYY." id="Criteria_ToDate" maxlength="12" name="Criteria.ToDate" size="12" type="text" value="" />

                        <span class="field-validation-valid" data-valmsg-for="Criteria.ToDate" data-valmsg-replace="true"></span>
                    </td>
                </tr>
                <tr>
                    <th class="empty"></th>
                    <td>
                        <button type="submit" title="Search" id="SubmitButton" class="gradientbutton gradientsmall gradientorange">Search</button>&nbsp;
                        <button type="button" title="Clear" id="ClearButton" class="gradientbutton gradientsmall gradientorange">Reset</button>
                    </td>
                </tr>
            </tbody>
        </table>
</form>

イベントによって呼び出されたJS送信メソッド:

searchFormSubmit: function ($form, currentForm) {
        if ($form.valid()) {
            var $button = $("#" + FileTransferHome._enum.SubmitButton);
            var $searchResults = $("#" + FileTransferHome._enum.SearchResultsDivId);

            jMessage("Processing request...", $button, true, false);
            $.ajax({
                cache: false,
                url: currentForm.action,
                type: currentForm.method,
                data: $form.serialize(),
                error: function (xhr, ajaxOptions, thrownError) {
                    jMessageHide();
                    $searchResults.html(xhr.responseText).addClass(JSGlobalVars.MessageBoxError).fadeIn('slow');
                },
                success: function (result) {
                    jMessageHide();
                    $searchResults.removeClass(JSGlobalVars.MessageBoxError).html(result).fadeIn('slow');
                    location.hash = "SEARCHRESULTS";
                }
            });
        }
    }

アクション:

このケースをテストするためだけに入れたelseブロックがあり、メインブロックではなく実行されます。

[HttpPost]
public ActionResult Index(ElectronicFileTransferHomeViewModel model)
{
    ... actions...
}

ここに画像の説明を入力してください

4

1 に答える 1

0

これは内部アプリとして、Windowsログインの背後にあります。SafariにはWindows認証に関する問題はありません。(理想的ではありませんが)私たちにとってうまくいくように見える回避策は、Safariをプライベートブラウジングモードにすることです。

于 2014-02-24T22:43:40.783 に答える