When I open my page, I get error: $.document is null. Why? Secondly, is there any way to determine from which path the below given code is loading the file "filevalues.php"?
<script type="text/javascript">
try {
$(document).ready(function(){
$("#Edit").click(function(){
$.get('fetchvalues.php', null, function(){
alert('reached');
});
});
});
}
catch(e)
{
alert(e.message);
}
</script>
First of all, there's no such thing as $.document
. I take it you mean $(document)
, since that's what your code says...?
If $(document)
doesn't work, your jQuery library isn't being loaded correctly, or it's in conflict with something else that overwrites the value of $
. If jQuery(document)
also isn't working, then the problem is the former.
Firefox's Firebug is a very good tool to trace down issues like that. You can reload the page and see the request for the jquery js file being made, see exactly what path it is requesting, and exactly what it receives in response.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With