How could I take only the contents of a specific DIV while using AJAX?
Hi everyone! , It's my first post here in jQuery forums. I have something to ask about using AJAX to fetch specific DIV tag contents from the target page.
Let say I call it on the referring page:
$.ajax({
type: "POST",
url: "the_target_page.php",
success: function(data) {
// Some data here
}
});
and the target page:
<html>
<head>
</head>
<body>
<div id="formWrapper">
<div id="maincontents">
// Here is the data I want to fetch
<h1>blah blah blah</h1>
</div>
</div>
</body>
</html>
How will I gather just the data on that specific tag? I just wanted to separate display from AJAX and direct call.
Thanks.