theglasspenguin @theglasspenguin

please help me with this

theglasspenguin @theglasspenguin

so can html/javascript pros help me here with something (for something i’m working on)

i have a part of a webpage that i want to replace when a condition is met

i already have the if-statement, but when i use methods to replace the innerHTML, it doesn’t work

so uhh how do i replace a multiline html element with multiline html?

(sorry if this post is confusing)

Aug 10, 2022, 12:40 AM
11
Aug 15, 2022, 9:20 PM
3
View all

comments

Highlighted comment

Put the part to replace in a div with an id, then set document.getElementById(“id”).innerHTML = `<div>whatever</div>`