I have a page that is not recognising this script:
<div id='userInfo'></div>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script>
$(document).ready(function(){
var id = $("#dropdown").find(":selected").val();
//alert('Select:');
// load it in the userInfo div above
$('#userInfo').load('data.php?id=' + id);
$("#dropdown").change(function(){
// get the selected user's id
var id = $(this).find(":selected").val();
//alert('Select:');
// load it in the userInfo div above
$('#userInfo').load('data.php?id=' + id);
});
});
</script>
It might recognise the script but the data.php its looking for is not being picked up even though it is in the same directory. The select statement is working fine. I have tried this on two separate servers, it works on one and not on the other. I need it to work on the one its not working on of course.
The one its working on the form is a directory called /form and this one is in a directory called /letters on a subdomain. How do I get it to recognise the where data.php is?