필자가 작성하지 않은 하위 체크 인을위한 검색 상자가 두 개 있습니다. 입력 상자를 jquery 자동 완성으로 업그레이드했습니다. 그들은 일하고, 나는 이름으로 검색 한 다음 ID 번호를 입력한다.자바 스크립트에서 변수가 전달되지 않습니다.
그러나 각 사람의 사진을 가져와야하는 "확인"을 클릭하면 성인에게 아무런 변화가 없습니다. 성인 필드는 선택 사항이며 두 번째 필드입니다. 나는 이것이 내 문제라고 생각한다.
업데이트 : 내가 첫 번째 자동 완성 상자 "아동"을 주석 처리하고 10 명이 성인을 혼자두고 떠나면 작동합니다. 실제 자동 완성 부분을 건너 뛰고 상자에 숫자를 입력하면 동일한 오류가 발생합니다.
<form method="post" action="Checkin.php" name="Checkin">
<input type="hidden" name="EventID" value="<?php echo $iEventID ; ?>">
<table cellpadding="0" cellspacing="0" width="100%" align="center" border="1">
<tr>
<td>
<caption>
<h3><?php echo gettext("Add Attendees for Event: $event_title"); ?></h3>
</caption>
</td>
</tr>
<tr>
<!-- Right Side new searchbox here-->
<td width="33%" valign="top" align="right">
<head>
<script type="text/javascript" src="jquery/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jquery/js/jquery-ui-1.8.2.custom.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
$('#child').autocomplete({source:'suggestname.php', minLength:2});
$.noConflict()
});
</script>
<link rel="stylesheet" href="jquery/css/smoothness/jquery-ui-1.8.2.custom.css" />
<style type="text/css"><!--
/* style the auto-complete response */
li.ui-menu-item { font-size:12px !important; }
--></style>
</head>
<form onsubmit="return false;">
Enter a name:
<input id="child" type="text" name="child" />
</form>
</td>
<!-- Middle -->
<td width="33%" valign="top" align="center">
<input type="submit" class="icButton" <?php echo 'value="' . gettext("Verify") . '"'; ?> Name="Verify" onclick="javascript:document.location='Checkin.php';">
<input type="submit" class="icButton" <?php echo 'value="' . gettext("Back to Menu") . '"'; ?> name="Exit" onClick="javascript:document.location='Checkin.php';">
<input type="button" class="icButton" <?php echo 'value="' . gettext("Add Visitor") . '"'; ?> name="Add" onClick="javascript:document.location='PersonEditor.php';"></td>
<!-- Left Side -->
<td width="33%" valign="top" align="left">
<head>
<script type="text/javascript" src="jquery/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jquery/js/jquery-ui-1.8.2.custom.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
$('#adult').autocomplete({source:'suggestname2.php', minLength:2});
$.noConflict()
});
</script>
<link rel="stylesheet" href="jquery/css/smoothness/jquery-ui-1.8.2.custom.css" />
<style type="text/css"><!--
/* style the auto-complete response */
li.ui-menu-item { font-size:12px !important; }
--></style>
</head>
<body>
<form onsubmit="return false;">
Enter a name:
<input id="adult" type="text" name="adult" />
</form>
</body>
</td>
</tr>
<tr>
<td width="33%" align="right">
Child's Name
</td>
<td width="33%" valign="top" align="center">
</td>
<td width="33%" valign="top" align="left">
Adult's Name
</td>
</tr>
</table>
</form>
유효한 HTML 페이지로 시작해야합니다. 예를 들어 허락되지 않은 장소에 '
'요소가 있습니다. – jeroen^hes 맞아, 머리 태그가로드되기 전에 양식이 있습니다. – Nick