ユーザーがデータベーステーブルでクリックした情報を取得するjquery関数があります。ユーザーはマウスオーバー時に強調表示される10行のいずれかを選択でき、ユーザーが強調表示された行をクリックすると、関数がそれを取得してテキストボックスに配置します。 。次に、ユーザーがこの購入リクエストを送信した場合、注文フォームである次のページのテキストボックスをエコーします。
以下のコードは、URLから情報を取得しようとするまではうまく機能します。URLで次のページに渡されていることがわかりますが、2日間試しても、取得できませんでした。ここからどこへ行けばいいのかわからない。誰かがこれを見て、私が正しくコーディングしていないか、何か間違ったことをしていないかどうかを確認できますか?適用されるコードをコピーしました...
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("table tr").click(function(){
$("#txttread").val($.map($(this).children('td:not(:eq(7))'), function (item) { return $(item).text() }).join(' - '));
});
});
$(document).ready(function() {
$('.pickme tr').not(':first').hover(
function() { $(this).addClass('highlight'); },
function() { $(this).removeClass('highlight'); }
).click( function() {
$('.selected').removeClass('selected');
$(this).addClass('selected').find('input').attr('checked','checked');
});
});
</script>
</head>
<body>
<form action="Order.html" method="GET" name="myform2" />
<div>
<div style="text-align:left height:250px;">
<DIV STYLE="font-family: Arial Black;
color: black; font-size: 20pt;">
Select from inventory below:<br/><input type="text" style="width:500px; height:35px;" rows="1" STYLE="font-family: Arial Black;
color: red; font-size: 20pt;" name="txttread" id="txttread" DISABLED /></div></div></div>
<div>
<div style="text-align:center;">
<br/><input type="button" button id="getone" name="getone" value="Submit your request for purchase" onclick="window.location.href = 'http://localhost/order.html?txttread='+ ( $('#txttread').val() )"><br/><hr/>
</body>
</html>
次のページのURLは...です。
http://localhost/order.html?txttread=Firestone - All Season - FR-710 - 225/60/16 - 4 - 3 - 60.00