Cannot get a popup form from a link to open on the same page

Hi, I am struggling to get a form popup to open on the same page as the link to it. I am trying to link to the form, and it must popup on, when I click on the link;
Unfortunately, the site is not live, so I do not have a link. Its local on the computer.

function div_show() {
document.getElementId(‘JohnForm’)
style.document=“block”;
}

function div_hide() {
document.getElementId(‘JohnForm’)
style.document=“none”;

}

.John_Form {
display: none;
position: fixed;
bottom: 0;
right: 15px;
border: 3px solid #f1f1f1;
z-index: 9;
}

.form-container {
max-width: 300px;
padding: 10px;
background-color: white;
}

.John_Form {
display: none;
position: fixed;
bottom: 0;
right: 15px;
border: 3px solid #f1f1f1;
z-index: 9;
}

.form-container {
max-width: 300px;
padding: 10px;
background-color: white;
}

Ask John a question

  • First Name
  • Last Name
  • Email
  • Hey!

    Looking though your code, I would suggest looking at how exactly you’re updating the style properties, the standard way to do it is to select the appropriate elements, then update their element.style.property property, for example

    let myButton = document.getElementById('button')
    myButton.style.backgroundColor = "red"; 
    

    Also, when sharing code please format it according to this post, it makes it a lot easier to debug. :slight_smile: