theglasspenguin — 8/15/2022, 9:20:10 PM

please help me with this

↩ repost
theglasspenguin — 8/10/2022, 12:40:50 AM

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)

♥ 3 ↩ 2 💬 11 comments
♥ 2 ↩ 0 💬 3 comments

comments

wynd:

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

8/15/2022, 9:46:18 PM
theglasspenguin:

hey, it worked! thanks!

8/15/2022, 9:54:39 PM
wynd:

Oh neat

8/15/2022, 10:23:29 PM