Basic Algorithm Scripting on steroids [SOLVED]

Hi campers! Hoping someone can help me with an issue I’m having.
I’m going through the JavaScript portion and recently finished up the Basic Algorithm Scripting portion. I thought I wanted to keep the solutions and just opening up the console is boring so why not make an interactive page. I took my meager HTML, CSS and JS skills and made one.

Here’s the issue. My interactive scripting page has a different placeholder for each of the five selections from the dropdown. If you just select each of the selections the placeholders change correctly. The issue is when a user enters their input. When going to the next selection, the input does not clear.
I first tried clearing the area with;
document.getElementById("textbox").placeholder = ""; and that didn’t work but made me think I don’t want to clear the placeholder per se, I need to clear the input area so I tried;
document.getElementById("textbox").innerHTML = ""; thinking that what I needed was to clear the input area and this should do it when the page repaints. But that doesn’t work either. Google only unveiled the two things I’ve tried so I’m kinda stuck. Any thoughts?

1 Like

Hey @Roma. I really like your idea of an interactive scripting page! Have you tried document.getElementById("textbox").value= ""?

1 Like

That was too simple! I could’ve sworn I tried that but apparently I didn’t.
Thank you so much @LoneWanderer, for both the solution and liking my idea.

1 Like