Not working onload ajax page?

<script src="auto_fill/AFjquery.min.js"></script>
<link rel="stylesheet" href="auto_fill/AFjquery-ui.css">
<script src="auto_fill/AFjquery-ui.min.js"></script>
<script src="auto_fill/AFchosen.jquery.min.js"></script>
<link rel="stylesheet" href="auto_fill/AFchosen.min.css" type="text/css" />


<select name="billing_type_id" class="validate-selection" id="chosen" style="width:340px;">
<option value="" hidden="">Select Lab Name</option>
<? $select_doctor_list=mysql_query("select * from `insource_lab` order by `lab_name` asc");
  while($fetch_doctor_list=mysql_fetch_array($select_doctor_list)) {?>
<option value="<?=$fetch_doctor_list['id']; ?>"><?=$fetch_doctor_list['lab_name']; ?></option>
<? }?>
</select>

<script type="text/javascript">
  $autfile=$.noConflict(); 
  $autfile("#chosen").chosen();
</script>

Hi @shanmugavel1 and a warm welcome to the forum.

I would try to simplify the script and run this standalone web-page.

Use the Browser Debugger and see if any errors are shown.

<?php 
	declare(strict_types=1);
	error_reporting(-1);
	ini_set('display_errors', 'true');

?><!doctype html>
<html>
<head>
<title> Title goes here </title>
<style>
  body {background-color: #f3f3f3; color:#000;}
</style>
<script src="auto_fill/AFjquery.min.js"></script>
<link 	rel="stylesheet" href="auto_fill/AFjquery-ui.css">
<script src="auto_fill/AFjquery-ui.min.js"></script>
<script src="auto_fill/AFchosen.jquery.min.js"></script>
<link 	rel="stylesheet" href="auto_fill/AFchosen.min.css" type="text/css" />
</head>
<body>


<select 
	name  = "billing_type_id" 
	class = "validate-selection" 
	id 	  = "chosen" 
	style = "width:340px;"
>
	<option value="XXX" hidden="">
		Select Lab Name
	</option>

		<?php 
			$sql = "select * from `insource_lab` order by `lab_name` asc";
			$select_doctor_list=mysql_query($sql);
			while($fetch_doctor_list=mysql_fetch_array($select_doctor_list))
			{
		?>
<option value="XXX" hidden="">
		Select Lab Name
	</option>

		<?php 
			$sql = "select * from `insource_lab` order by `lab_name` asc";
			$select_doctor_list = mysql_query($sql);
			while($fetch_doctor_list=mysql_fetch_array($select_doctor_list))
			{
		?>

			<option 
				value="<?=$fetch_doctor_list['id']; ?>">
				<?=$fetch_doctor_list['lab_name']; ?>
			</option>

	<?php }?>

			<option 
				value="XXX<?=$fetch_doctor_list['id']; ?>">
				<?=$fetch_doctor_list['lab_name']; ?>
			</option>

	<?php }?>
</select>

<script type="text/javascript">
	$autfile=$.noConflict(); $autfile("#chosen").chosen();
</script>

</body>
</html>

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.