Errors indicated when referencing elements in Public code.

I am changing the text in a Text element on the site header to indicate an error condition - rather than having to open a lightbox. I’m doing this in a Public js file because it is called by multiple pages. It works but the IDE says that the element is “not a valid selector”. Is there any way to get rid of the IDE error since what I’m doing seems legit?

. **catch** (error => { 
    $w("#text61").text = "NP Document/Link Not Found."; 
} ); 

OK, it might be obvious that I’m a newbie :slight_smile:

Mike.

1 Like