1.) You need to set the display for the NUI to none by default, whether you do that in .css or on window/document load in .js is up to you, I think sometimes the .css display none doesn’t work though I may be wrong.
2.) When the player is near that location and presses E you need to SetNuiFocus and SendNUIMessage to tell the UI to open, and to set the display to block or whatever you choose.