I have this html page, that gathers the movie name and stores it in a JavaScript variable.
I only present this solution since somebody commented that parsing query strings in JavaScript is a bit cumbersome...and given that I can accomplish want you want in one line of code (without any of the rest of your program having to change that much) you might want to consider this instead:
var movieName = window.opener.document.getElementById("movieName").value;
Replace the line that used to read `var movieName = getQueryVariable("movieName")' with the one above and that's all there is to it...
in fact my solution allows you to refactor out now unnecessary code in the first file as well:
change the ≤script≥ TAG so it reads:
...and as previously mentioned in the second file the ≤script≥ tag will read: