2009-07-30 12 views
4

アップロードフォームを送信すると、警告が表示されます。Error: Form elements must not be named "submit".いいえ、私は名前がsubmitのフォーム要素を持っていません。私はjQueryバージョン1.3.2を使用しています。エラー:フォーム要素の名前を「送信」にしないでください

この問題を修正したものは何ですか?

+5

コード/ htmlが少し役に立ちます –

+0

w3cでマークアップの検証を試してください。http://validator.w3.org/ – redsquare

答えて

7

私はこの問題を見ました。それはAPI/1.3/Selectorsから

$(':input[@name=submit]', form).length 

を言うjquery.form.jsファイルの行54でだ、それは私が1.2から1.3への私のjQueryのバージョンを交換したときに、私はおそらく問題を抱えて

Note: In jQuery 1.3 [@attr] style selectors were removed (they were previously deprecated in jQuery 1.2). Simply remove the '@' symbol from your selectors in order to make them work again.

と言います。今、私はその行を変更するか、jquery.form.jsの私のバージョンを置き換える必要があります。 Form.jsで

1

...

if ($(':input[name=submit],:input[id=submit]', form).length) { 

    // if there is an input with a name or id of 'submit' then we won't be 
    // able to invoke the submit fn on the form (at least not x-browser) 

    alert('Error: Form elements must not have name or id of "submit".'); 
    return; 
    } 

をあなたがエラーのポップアップ得ることができますなぜ、エラーコードは以下である。このエラーを見ることができます以下のコードを確認してくださいuが得ることができますなぜ今、あなたは理解してこのエラー、コードの上今のソリューションは非常に簡単です。..

Step 1--> Check Your input type="submit" name="submit" id="submit" 

フォームので、変更に私はこれまで..

enter code here 

input type="submit" name="save" id="save" 
01以下のように変更されたことを以下に何かを動作していません

thatsです。

関連する問題