Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9145551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:32:32+00:00 2026-06-17T10:32:32+00:00

I am getting the whole html page in responseText, i just want to parse/

  • 0

I am getting the whole html page in responseText, i just want to parse/
filter the responseText to
get a specific div say test and underlying contents. I would not
like to modify the server side code to send just required div in
responseText.

url: "Someurl",
datatype: "text/html",
success : function(responseText) 
{
    alert(responseText);
dat = $(data).filter("#test").html();
alert(dat);//getting null
$('#test').html(dat);

}

responseText contains

100’s of HTML lines….
….
….many more div tags and other
tags
….
100’s of HTML lines

I’m using jquery and i tried

$(responseText).filter("#test").html();

and used find too

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:32:34+00:00Added an answer on June 17, 2026 at 10:32 am

    If you have only html in the response AND your intention is to pinpoint a DIV using a unique ID, then it might be even easier than the example I gave earlier.

    Try something like this

    var myHtml = $(responseText).find('#test').html();
    //alert(myHtml); -- optional, just to verify
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to download and parse the HTML of a web page. Recently, the
I am just starting with PHP and having trouble of getting my page result
Code : $html = file_get_html('http://url.com'); $ret = $html->find('div[samplediv]'); echo $ret; The output I get
I'm just getting into this whole node.js business and like it so far; however
I'm rather new to MVC and as I'm getting into the whole framework more
I am new to the whole MVP thing and slowly getting my head around
I am having trouble getting my listbox items to stretch to the whole listbox
I am getting 500 Internal error with Apache and FastCGI. Spent the whole day
I'm trying to parse meta tags with Scala. I've tried just doing this with
Does urllib2 fetch the whole page when a urlopen call is made? I'd like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.