Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Search</title>
<script src ="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
</head>
<body>
<input id='search' type="text">
<div id = 'result'></div>
<script>
$("#search").on("input",function()){
	$search = $("#search").val();
	if($search.length>0){
		$.get("res.php",{"search":$search},function($data){
			$("#result").html($data);
		})
	}
});
</script>
</body>
</html>


What I have tried:

I copy this code from yt tutorial, everyone it works except me
Posted
Comments
Mehdi Gholam 4-Aug-16 4:18am    
You can't expect any meaningful answer with the little information you have provided.

Try running in a debugger.
Mohibur Rashid 4-Aug-16 4:21am    
I don't see any PHP
Member 12669410 4-Aug-16 4:24am    
Mohibur Rashid 4-Aug-16 4:58am    
so, try this
{your current utl}/res.php
in your browser. see what happens
Member 12669410 4-Aug-16 4:24am    
sry here is php in res.php

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900