Board Thread:General Coding Help/@comment-27820485-20170310041158/@comment-4018164-20170310225850

Well, 2 reasons:
 * 1. Problems with

WarnUser has 2 lines, where each has a problem. The first line is: To the browser, this line takes the user input from the prompt window and executes its "log" method. If the user did submit some text, an error would occur, since strings don't have a "log" method (unless your wiki has set a  method). If the user presses "cancel" in the popup, that's even worse, since the returend value would be, and attempting to set or get properties from null always throws an error. Same story with the second line. "log" isn't a method of strings.
 * 1. Problems with the first line

is meant to be passed a single argument- the element's tag name- it cannot be used for parsing HTML. If you want to parse some HTML, here are your options: