1

Hi,

I would like to display an element (div) of another web page, hosted on a owned sub domain..

I was planning to use iframe, but it seem that iframe only allow to grab the entire page... any ideas ?

Thanks.

top 4 comments
sorted by: hot top controversial new old
[-] Rick_C137@programming.dev 2 points 9 months ago* (last edited 9 months ago)

@UFODivebomb@programming.dev & @ExperimentalGuy@programming.dev

Thank you for your input !

I've finally ~~used~~ been forced to use https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API and DOMParser().parseFromString()

I say forced, because so far it's only that Prehistoric JS available for the front-end, HOPEFULLY there is some coming kick-ass technology to get rid of JS --> https://brython.info ❤️

[-] ExperimentalGuy@programming.dev 1 points 9 months ago

Never used brythom but I'm aware of it, what's the pros?

[-] Rick_C137@programming.dev 1 points 5 months ago

You can interact with the HTML DOM with Python !!!!!

[-] UFODivebomb@programming.dev 1 points 9 months ago

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/HTML_in_XMLHttpRequest

Grab the HTML. Slice up the DOM to get the div. Add to the page.

Probably want more than just the div. Might run into cross origin issues.

this post was submitted on 24 Oct 2023
1 points (100.0% liked)

HTML

289 readers
1 users here now

founded 1 year ago
MODERATORS