Post the error as preformatted text to make it easier to read, please see Wiki - how to post code on this forum.
You need to bind the tag you want to watch/trigger the popup to a custom property on either your perspective session or view, and then use a value changed script on that property to open the popup.
If you bind on the session property, you'll need to use a message handler to send an open window message to the currently open view, which will need to have the associated message handler defined.