I have this html page, that gathers the movie name and stores it in a JavaScript variable.
This way:
var movieName = window.location.hash;
and the URL shall look like
window.open("display.html#42"); // '42' is presumably that movie ID.