How to get data/response from url through jquery/ajax
M akram M akram @ programming 2020-05-23 16:55:28
clicks 917

Hy ! I need to scrap data from a url and need to filter that data. But I have code filter function now only thing i need is to fetch all content OR we can say scrap data from url and apply functionality to it.

suggestion

3

solution

2

Suggestions
Solution
ali kamran

First of all include library.


And then use this jquery get function to load all content in form of response


osama

The second way is through http request you send get request to url and get response.No need for any library.

Things need to focus.
  • onreadystatechange Defines a function to be called when the readyState property changes
  • readyState Holds the status of the XMLHttpRequest.
    • 0: request not initialized
    • 1: server connection established
    • 2: request received
    • 3: processing request
    • 4: request finished and response is ready
  • status
    • 200: "OK"
    • 403: "Forbidden"
    • 404: "Page not found"
  • statusText Returns the status-text (e.g. "OK" or "Not Found")


M akram
author of post

M akram
muhammadakram235711@gmail.com
message
Login now to make suggestion for this post!