AJAX help needed
- by tharindu
Hi guys.. i have problem in ajax.. im new comer for ajax...:)
<script type="text/javascript">
$(document).ready(function()
{
$("#bcode").focus();
//prevents autocomplete in some browsers
$("#bcode").attr('autocomplete', 'off').keyup(function(event)
{
var name = $("#bcode").val();
$("#status").empty();
if(name.length > 17 )
{
selectAll();
$("#status").html('<img align="absmiddle" src="loading.gif" /> Checking availability...').show();
$.ajax({
type: "POST",
url: "namecheck.php",
data: "bcode="+ name,
success: function(msg)
{
$("#status").html(msg).show();
}
});
}
else
{
$("#status").html('').addClass('err').show();
}
});
});
//-->
</script>
i got text box value 'bcode' using '$_POST['bcode']'
<input name="bcode" type="text" class="bcode" id="bcode" maxlength="18"; />
also i have menu/list in that form
<select name="pallete" class="list_box" id="select">
<option value="P0" selected> </option>
<option value="P1">P1</option>
<option value="P2">P2</option>
<option value="P3">P3</option>
<option value="P4">P4</option>
<option value="P5">P5</option>
</select>
How i can access selected item from php file by using '$_POST['pallete']'
please help me.
Thanks in advance..