I want to replace a pop up window with a modal in a web application. The previous implementation uses JQuery `$j('input field name', opener.document);` to access values stored on the previous, parent screen - this doesn't work with a modal implementation, it throws an 

```
Uncaught TypeError: Cannot read property 'document' of null

```

Can anyone suggest an alternative for opener.document for use with Bootstrap Modal?

Thanks in advance