Reputation: 245
I am stuck in a strange problem. The code I am using is working fine in one page but it is not working for another page. I tried everything I could, I even changed the document header to match the page which is working but none is working for me. And then I created a fresh page and typed only the coding that passing the content, but it didn't work in the new page too. I am totally confused and don't know what to do.
Code:
<head>
<script type="text/javascript">
$(document).ready(function(){
$('#bill2').load('http://website.com/fare.html #bill2')
})
</script>
</head>
<body>
<fieldset id="bill2">
</fieldset>
</body>
This code works in one page and not working in another, please tell me am I missing something?
Upvotes: 0
Views: 794
Reputation: 9285
This is not answer but I think i should not write this in comment.
Try this full syntax to fig out error
$("#success").load("xxx.php", function(response, status, xhr)
{
if (status == "error")
{
var msg = "Sorry but there was an error: ";
$("#error").html(msg + xhr.status + " " + xhr.statusText);
}
});
Upvotes: 0
Reputation: 26732
Try this and let me know --
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#bill2').load('http://website.com/fare.html#bill2');
});
</script>
</head>
<body>
<fieldset id="bill2">
</fieldset>
</body>
Upvotes: 1