I am trying to refactor this small chunk of code to define commonly-required variables and use them in the methods. Why does **this.title** work but **this.dialogoverlay** does not? The commented line works, but I want to refactor as stated so I don't have to use `document.getElementById` over and over.

```
function CustomAlert(){

   this.title = "This is My Title";

   this.dialogoverlay = document.getElementById('dialogoverlay');

   this.render = function(dialog){
      // document.getElementById('dialogoverlay').style.display = "block";
      this.dialogoverlay.style.display = "block";
      document.getElementById('dialog-shadow').style.display = "block";
      document.getElementById('dialogbox').style.display = "block";
      document.getElementById('dialogboxhead').innerHTML = this.title; 
      document.getElementById('dialogboxbody').innerHTML = dialog;

      etc...

```

I get "Can't set style of null."