In certain conditions, I have a web page that gets opened in an iframe. When it's loaded into that iframe, I need it to set the window location to a resource to download a file (all of this in an attempt to make an update for a GreaseMonkey script... all legit, btw). Unfortunately, when I do:
top.location.href = "http://userscripts.org/...";
I get an error stating that top is null. when using "window" in place of "top", firefox loads my script text into the iframe, but GreaseMonkey is unable to detect it as an update for some reason. Is there another method to setting the window's location that I've missed somehow?
Edit: The users of my script visit a specific business's page (first). My script is loaded into that page using a firefox plugin called GreaseMonkey. My script creates an iframe on the visited page, and loads my page (second) into that iframe. GreaseMonkey then loads my script onto my page, which checks a value on my page to see if the script has been updated. If the script has been updated, I need to navigate my users away from the site that they originally visited (noted as "first"), and to another (third) site (userscripts.org). Hopefully this clears up some confusion.