Retrieving element content from an external page

We quote from the rebuild website in which we accept the current website, make a new design for it, and then restore it to the Business Catalyst (Adobe Content Management System).

Unfortunately, the current site is extracting information from what I suppose to be a MySQL table (since the site is written in PHP), and Business Catalyst does not support the use of server languages.

Is there a way so that I can extract the HTML segment from a remote page on the Internet and display it on a new website using a third-party script, possibly with jQuery?

Here are a few suggestions that I have made, and arguments in favor of why they are not viable for this situation:

  • iFrame - At first it occurred to me, but I'm not sure if this is possible:
    a. HTML loaded style
    b. The content I want to capture is in the center of the page β€” I don’t know how to display the contents of the iFrame, starting from the upper left corner of this container, and not at the top left of the page itself.
    "
  • Export the contents of the current MySQL table to Excel and then import it into Business Catalyst - this was knocked down because the company has inventory management software on its computers that are connected to the database, which means it is updated up to 10 times in day.

Any suggestions would be great.


If anyone can tag this question is better for me to be appreciated as I am having problems.

+1
source share
1 answer

You can use the jQuery load() function to load content from an external page (even a specific div on another page) into the div of the current page, for example:

 $("#load_content_in_this_div").load("page.html #div_to_pull_from"); 

This will load the content output from the #div_to_pull_from div on page.html into the div #load_content_in_this_div on the current page.

As for pulling content from pages in another domain, this plugin should do the trick.

+2
source

Source: https://habr.com/ru/post/903739/


All Articles