MozillaZine.jp フォーラム https://forums.mozillazine.jp/ |
|
</select>タグの次に<input type="hidden"...>とした場合 POST送信のフィールド順が狂う https://forums.mozillazine.jp/viewtopic.php?f=2&t=10448 |
ページ 1 / 1 |
作成者: | bowmoon [ 2010年7月24日(土) 19:42 ] |
記事の件名: | </select>タグの次に<input type="hidden"...>とした場合 POST送信のフィールド順が狂う |
お世話になります。初めての投稿です。 最近Google Chromeで動作するWEBデータベース用CGIを生成するプログラムを開発していてFireFox3.6.7での試験中に以下の事象に遭遇しました。現在FireFox以外のブラウザでは発生しておりませんのでお知らせいたします。 </select>タグの次に<input type="hidden"...>とした場合 POST送信のフィールド順が狂う問題です。<input type="text"...>とした場合はこうした問題は発生しません。 FireFox 3.6.7で以下の①POSTメソッドを実行した場合結果②になります。 ① <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>form text_writeHTML page</title> <script language="JavaScript"> <!-- function MkArray(n) { this.length = n; for (var i=1;i<=n;i++) { this[i] = 0 return this } } --> </script> </head> <body> <br> <table border=0> <tr bgcolor=#ffffff> <td><a href="http://codoo2hk.corede.net/takuhai/takuhai.html" target="_parent">TOPへ</a></td> <td><a href="#" onClick="history.back(); return false;">戻る</a></td> <form method="post" accept-charset="utf-8" action="/cgi-bin/kokyaku_Delete.fcgi?field00=00112"> <td><input type="submit" value="顧客削除"></td> </form> <form method="post" accept-charset="utf-8" action="/cgi-bin/kokyaku_Fetch_New.fcgi?field00=00112"> <td><input type="submit" value="新規顧客の登録"></td> </form> <form method="post" accept-charset="utf-8" action="/cgi-bin/otodoke_Fetch_New.fcgi?field00=00112"> <td><input type="submit" value="新規お届け先追加画面へ"></td> </form> <form method="post" accept-charset="utf-8" action="/cgi-bin/kokyaku_Update.fcgi"></td> <td><input type="submit" value="顧客の更新"></td> <td><input type="reset" value="元に戻す"></td> </tr><table border=0> <tr bgcolor=#ffffff> <tr><td>顧客情報ID:</td><td><input type="text" name="field00" size="5" value="112" maxlength="5" accept-charset="utf-8"><br> </td><tr><td>顧客コード:</td><td><input type="text" name="field01" size="5" value="00112" maxlength="5" readonly accept-charset="utf-8"><br> </td><tr><td>応対区分:</td><td><input type="text" name="field02" size="5" value="1" maxlength="5" accept-charset="utf-8"><br> </td><tr><td>氏名:</td><td><input type="text" name="field03" size="64" value="大野 勇樹" maxlength="64" accept-charset="utf-8"><br> </td><tr><td>シメイ:</td><td><input type="text" name="field04" size="64" value="オオノ ユウキ" maxlength="64" accept-charset="utf-8"><br> </td><tr><td>職業:</td><td><input type="text" name="field05" size="12" value="" maxlength="12" accept-charset="utf-8"><br> </td><tr><td>会社名:</td><td><input type="text" name="field06" size="64" value="" maxlength="64" accept-charset="utf-8"><br> </td><tr><td>役職:</td><td><input type="text" name="field07" size="12" value="" maxlength="12" accept-charset="utf-8"><br> </td><tr><td>〒:</td><td><input type="text" name="field08" size="7" value="4000203" maxlength="7" accept-charset="utf-8"><br> </td><tr><td>都道府県名:</td><td><input type="text" name="field09" size="20" value="山梨県" maxlength="20" accept-charset="utf-8"><br> </td><tr><td>住所1:</td><td><input type="text" name="field10" size="64" value="南アルプス市徳永9999" maxlength="64" accept-charset="utf-8"><br> </td><tr><td>住所2:</td><td><input type="text" name="field11" size="64" value="" maxlength="64" accept-charset="utf-8"><br> </td><tr><td>MAIL:</td><td><input type="text" name="field12" size="50" value="prowler@topaz.ocn.ne.jp" maxlength="50" accept-charset="utf-8"><br> </td><tr><td>会社TEL:</td><td><input type="text" name="field13" size="13" value="" maxlength="13" accept-charset="utf-8"><br> </td><tr><td>内線番号:</td><td><input type="text" name="field14" size="13" value="" maxlength="13" accept-charset="utf-8"><br> </td><tr><td>FAX:</td><td><input type="text" name="field15" size="13" value="" maxlength="13" accept-charset="utf-8"><br> </td><tr><td>携帯TEL:</td><td><input type="text" name="field16" size="13" value="09012125441" maxlength="13" accept-charset="utf-8"><br> </td><tr><td>自宅TEL:</td><td><input type="text" name="field17" size="13" value="055-285-1564" maxlength="13" accept-charset="utf-8"><br> </td><tr><td>印刷する:</td><td><input type="checkbox" name="field18" size="2" value="t" checked><br> </td><tr><td>返事なし:</td><td><input type="checkbox" name="field19" size="2" value="t" checked><br> </td><tr><td>住所不明:</td><td><input type="checkbox" name="field20" size="2" value="t" checked><br> </td><tr><td>喪中:</td><td><input type="checkbox" name="field21" size="2" value="t"><br> </td><tr><td>備考:</td><td><textarea name="field22" rows="4" cols="64" accept-charset="utf-8"></textarea><br> </td></tr><tr><td>YahooID:</td><td><input type="text" name="field23" size="32" value="" maxlength="32" accept-charset="utf-8"><br> </td></tr></form> </table> <table border=0 width=1400> <tr bgcolor=#ffffff> <td>00001</td> <hr size="3" color="#000000"></hr><a name="form00000"></a> <a href="http://codoo2hk.corede.net/takuhai/takuhai.html" target="_parent">[TOPへ]</a> <a href="#" onClick="window.top()">[画面TOPへ]</a> <a href="#" onClick="history.back(); return false;">[前に戻る]</a> <form method="post" accept-charset="utf-8" action="/cgi-bin/otodoke_Delete.fcgi?field000=00112&field01=1"> <input type="submit" value="お届け先削除"> </form> <form method="post" accept-charset="utf-8" action="/cgi-bin/otodoke_Fetch.fcgi?field00=00112&field01=1"> <input type="submit" value="お届け先追加画面へ"> </form> <form method="post" accept-charset="utf-8" action="/cgi-bin/otodoke_Fetch_all.fcgi?field00=00112&field01=1&field02=00000"> <input type="submit" value="お届け先更新画面へ"> </form> <form name="form00000" method="post" accept-charset="utf-8" action="/cgi-bin/otodoke_Update2.fcgi"> <input type="reset" value="元に戻す"> <input type="submit" value="お届け先更新" onclick="submit0()"><br> No:<input type="text" name="field00" size="5" value="1" maxlength="5" accept-charset="utf-8"> 郵便番号:<input type="text" name="field01" size="7" value="4000203" maxlength="7" accept-charset="utf-8"> 都道府県:<input type="text" name="field02" size="12" value="山梨県" maxlength="12" accept-charset="utf-8"> 住所1:<input type="text" name="field03" size="48" value="南アルプス市徳永9999" maxlength="96" accept-charset="utf-8"> 住所2:<input type="text" name="field04" size="48" value="" maxlength="96" accept-charset="utf-8"><br> 氏名1:<input type="text" name="field05" size="32" value="" maxlength="96" accept-charset="utf-8"> 品名:<script language="JavaScript"> <!-- function submit0() { document.form00000.tmp.value = "00000"; } function select_1st0() { var index1 = 0; var index2 = 0; s1 = new MkArray(31); s2 = new MkArray(31); s1[0] = "6"; s2[0] = "A"; s1[1] = "5"; s2[1] = "A"; s1[2] = "4"; s2[2] = "A"; s1[3] = "3"; s2[3] = "A"; s1[4] = "2"; s2[4] = "A"; s1[5] = "1"; s2[5] = "A"; s1[6] = "3"; s2[6] = "B"; s1[7] = "2"; s2[7] = "B"; s1[8] = "1"; s2[8] = "B"; s1[9] = "4"; s2[9] = "C"; s1[10] = "3"; s2[10] = "C"; s1[11] = "2"; s2[11] = "C"; s1[12] = "1"; s2[12] = "C"; s1[13] = "3"; s2[13] = "D"; s1[14] = "2"; s2[14] = "D"; s1[15] = "1"; s2[15] = "D"; s1[16] = "6"; s2[16] = "E"; s1[17] = "5"; s2[17] = "E"; s1[18] = "4"; s2[18] = "E"; s1[19] = "3"; s2[19] = "E"; s1[20] = "2"; s2[20] = "E"; s1[21] = "1"; s2[21] = "E"; s1[22] = "2"; s2[22] = "F"; s1[23] = "1"; s2[23] = "F"; s1[24] = "1"; s2[24] = "G"; s1[25] = "1"; s2[25] = "H"; s1[26] = "1"; s2[26] = "I"; s1[27] = "1"; s2[27] = "W"; s1[28] = "1"; s2[28] = "X"; s1[29] = "1"; s2[29] = "Y"; s1[30] = "1"; s2[30] = "Z"; index1 = document.form00000.field06.selectedIndex; index2 = document.form00000.field06.selectedIndex; document.form00000.field07.value = s1[index1-1]; document.form00000.field09.value = s2[index2-1]; submit0(); document.form00000.submit(); } function select_2nd0() { submit0(); document.form00000.submit(); } --> </script> <select name="field06" size="1" maxlength="64" onchange="select_1st0()"> <option value="" maxlength="90">選択なし</option> <option value="さおり"> さおり</option> <option value="ナポレオン"> ナポレオン</option> <option value="紅秀峰"> 紅秀峰</option> <option value="豊錦"> 豊錦</option> <option value="高砂"> 高砂</option> <option value="佐藤錦"> 佐藤錦</option> <option value="西野白桃"> 西野白桃</option> <option value="浅間白桃" selected> 浅間白桃</option> <option value="白鳳"> 白鳳</option> <option value="甲斐路"> 甲斐路</option> <option value="ベーリーA"> ベーリーA</option> <option value="ピオーネ"> ピオーネ</option> <option value="巨峰"> 巨峰</option> <option value="ころ柿"> ころ柿</option> <option value="あんぽ柿"> あんぽ柿</option> <option value="富有"> 富有</option> <option value="ササニシキ"> ササニシキ</option> <option value="秋田こまち"> 秋田こまち</option> <option value="農林48号"> 農林48号</option> <option value="農林22号"> 農林22号</option> <option value="ミルキークイーン"> ミルキークイーン</option> <option value="コシヒカリ"> コシヒカリ</option> <option value="武川米農林48号"> 武川米農林48号</option> <option value="武川米コシヒカリ"> 武川米コシヒカリ</option> <option value="農地貸借"> 農地貸借</option> <option value="その他の食品"> その他の食品</option> <option value="トレーラーハウス"> トレーラーハウス</option> <option value="空冷ビートル部品"> 空冷ビートル部品</option> <option value="楽器"> 楽器</option> <option value="総売上額"> 総売上額</option> <option value="パソコン指導"> パソコン指導</option> </select> <input type="text" name="field07" size="5" value="2" maxlength="5" accept-charset="utf-8"> 容量:<input type="text" name="field08" size="5" value="5" maxlength="5" accept-charset="utf-8"> <input type="text" name="field09" size="2" value="B" maxlength="2" accept-charset="utf-8"> <script language="JavaScript"> <!-- function submit0() { document.form00000.tmp.value = "00000"; } function select_grade0() { var index1 = 0; var index2 = 0; var index3 = 0; s1 = new MkArray(2); s2 = new MkArray(2); s3 = new MkArray(2); s1[0] = "5"; s2[0] = ""; s3[0] = "5000"; s1[1] = "5"; s2[1] = ""; s3[1] = "4000"; index1 = document.form00000.field10.selectedIndex; index2 = document.form00000.field10.selectedIndex; index3 = document.form00000.field10.selectedIndex; document.form00000.field08.value = s1[index1-1]; document.form00000.field11.value = s2[index2-1]; document.form00000.field12.value = s3[index3-1]; } function select_3rd0() { submit0(); document.form00000.submit(); } --> </script> グレード:<select name="field10" size="1" accept-charset="utf-8" maxlength="144" onchange="select_grade0()"> <option value="" maxlength="144">選択なし</option> <option value="贈答用" selected>贈答用</option> <option value="秀">秀</option> </select> サイズ:<input type="text" name="field11" size="10" value="" maxlength="10" accept-charset="utf-8"> 金額:<input type="text" name="field12" size="15" value="5000" maxlength="15" accept-charset="utf-8"> 宅配業者:<select name="field13" size="1" accept-charset="utf-8" maxlength="3"> <option value="" maxlength="3">選択なし</option> <option value="98">その他</option> <option value="5">ゆうパック</option> <option value="7">ゆうパック(速達)</option> <option value="25">ゆうパック代引</option> <option value="8">チルド+速達</option> <option value="6">チルドゆうパック</option> <option value="10">ペリカンクール便</option> <option value="9">ペリカン便</option> <option value="2" selected>ヤマトクール便</option> <option value="4">ヤマト果物便</option> <option value="3">ヤマト時間指定</option> <option value="1">ヤマト宅急便</option> <option value="11">佐川フルーツ便</option> <option value="99">直接</option> <option value="12">飛脚クール便</option> </select><br> 発送日:<input type="text" name="field14" size="10" value="2007/05/25" maxlength="10" accept-charset="utf-8"> 希望日:<input type="text" name="field15" size="10" value="" maxlength="10" accept-charset="utf-8"> <input type="text" name="field16" size="5" value="00112" maxlength="5" accept-charset="utf-8"> 発送済:<input type="checkbox" name="field17" size="3" value="t"> <input type="hidden" name="field18" size="5" value="0" maxlength="5" accept-charset="utf-8"> 箱数:<input type="text" name="field19" size="5" value="0" maxlength="5" accept-charset="utf-8"> 予約:<input type="checkbox" name="field20" size="2" value="t" checked> 予約日:<input type="text" name="field21" size="10" value="2010/07/24" maxlength="10" accept-charset="utf-8"> 印字可:<input type="checkbox" name="field22" size="2" value="t" checked> 印字枚数:<input type="text" name="field23" size="5" value="0" maxlength="5" accept-charset="utf-8"> のし:<input type="text" name="field24" size="5" value="" maxlength="5" accept-charset="utf-8"> 代替:<input type="checkbox" name="field25" size="2" value="t"> 希望時間帯2:<input type="text" name="field26" size="2" value="0" maxlength="2" accept-charset="utf-8"> 冷凍と冷蔵:<input type="checkbox" name="field27" size="2" value="t"> <input type="hidden" name="field28" size="5" value="0" maxlength="5" accept-charset="utf-8"> <input type="hidden" name="tmp" size="4" value="" accept-charset="utf-8"> </tr> </form> </table> </body> </html> ②POSTメソッドの受信側CGIで受けた生のストリング情報 Field06のところが<select>タグのある位置ですField07以降が最後に廻されています。 2010年 7月 24日 土曜日 18:47:58 JST:/usr/local/apache22/cgi-bin/kokyaku_Fetch.fcgi->FETCH結果チェック:0 - :110.3.95.171:Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 GTB7.1: 2010年 7月 24日 土曜日 18:48:00 JST:field00=1&field01=4000203&field02=%E5%B1%B1%E6%A2%A8%E7%9C%8C&field03=%E5%8D%97%E3%82%A2%E3%83%AB%E3%83%97%E3%82%B9%E5%B8%82%E5%BE%B3%E6%B0% B8%EF%BC%99%EF%BC%99%EF%BC%99%EF%BC%99&field04=&field05=&field06=%E6%B5%85%E9%96%93%E7%99%BD%E6%A1%83&field08=5&field10=%E8%B4%88%E7%AD%94%E7%94%A8&field11=&field12=5000&field13 =2&field14=2007%2F05%2F25&field15=&field19=0&field20=t&field21=2010%2F07%2F24&field22=t&field23=0&field24=&field26=0&field07=2&field09=B&field16=00112&field18=0&field28=0&tmp=00 000: |
作成者: | aides [ 2010年7月24日(土) 19:51 ] |
記事の件名: | Re: </select>タグの次に<input type="hidden"...>とした場合 POST送信のフィールド順が狂う |
ソレ以前に以下でソースの確認を。 エラーが多く確認されてます。 http://openlab.ring.gr.jp/k16/htmllint/htmllint.html |
ページ 1 / 1 | All times are UTC + 9 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |