Can't create a help post

I can’t create a help post directly from the challenge task. My task window is also weird — when I click on “preview” button just one more menu bar appears.

And there is no mobile version anymore, everything looks like a desktop version…

what happens when you try to?

can you show this?

Now it looks like that from my mobile…

When I try to create a post, nothing happens after I click on submit button, my help post draft just disappears

what is your code in the script.js file?

const input = document.querySelector("#text-input");
const result = document.querySelector("#result");
const form = document.querySelector("#form");
form.submit(function() {
  if (input === '') {
    alert("Please input a value");
  }
})

you don’t have a location variable?

Can you also share your html please?

alternatively, the preview issue may be because you asked the preview to reload with the submit, there is no place to use a form here as you don’t have a backend to send the infos to and everything needs to happen in the page, and reloading the preview has unexpected issues

I don’t have a “location” element.

Tried to remove the function with “form”, still nothing.

Here is my html code :

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset= "UTF-8">
    <meta name="viewport" content="width=device-width, initial scale=1.0">
    <link rel="stylesheet" href="styles.css">
    <title>Palindrome Checker</title>
  </head>
  <body>
    <header>
      <h1>Is it a palindrome?</h1>
    </header>
    <main>
      <div class="checker">
        <form id="form">
          <label for="text-input">
            Enter your text below
          </label>
          <input id="text-input" type="text">
       <button type ="submit" id="check-btn">Check</button>
        </form>
      </div>
      <div id="result"></div>
      <div class="dounow">
        <fieldset>
        <h3>🤔 Do you know what is a palindrome?
        </h3>
        <p> Palindrome is a word or a phrase that has the same order of letters in both directions.
        </p>
        </fieldset>
      </div>
    </main>
    <script src="./script.js"></script>
  </body>
  </html>

when you use form.submit you are submitting the form, meaning the page reload and that happens, don’t use form.submit

Removed form at all

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset= "UTF-8">
    <meta name="viewport" content="width=device-width, initial scale=1.0">
    <link rel="stylesheet" href="styles.css">
    <title>Palindrome Checker</title>
  </head>
  <body>
    <header>
      <h1>Is it a palindrome?</h1>
    </header>
    <main>
      <div class="checker">
          <label for="text-input">
            Enter your text below
          </label>
          <input id="text-input" type="text">
       <button type="button" id="check-btn">Check</button>
      </div>
      <div id="result"></div>
      <div class="dounow">
        <fieldset>
        <h3>🤔 Do you know what is a palindrome?
        </h3>
        <p> Palindrome is a word or a phrase that has the same order of letters in both directions.
        </p>
        </fieldset>
      </div>
    </main>
    <script src="./script.js"></script>
  </body>
  </html>