0

I found the following Javascript effect to be interesting and wanted to use it on my webpage as background.

http://www.chiptune.com/starfield/starfield.html

I saved the html page on to my computer and tried to run it locally, but all it render is a blank black page.

The page doesn't seem to use any external files other than the adsense .js'es. Then why is running on my browse directly from the their website but not locally from my computer.

Note - I ran it as file:///home/anirudh/fest/stars/Starfield.html and not from local server. Is that why it is not running?

15
  • 1
    Which browser did you save it with? What does the error console show? Commented Jan 21, 2013 at 16:35
  • including html page does not include the whole includes of that document, it just saves the HTML Commented Jan 21, 2013 at 16:36
  • 1
    It's not working because their server 'serves' up the javascript and other assets. If you open that local page up in firebug or the chrome inspector I bet you see a ton of errors for missing assets. Commented Jan 21, 2013 at 16:36
  • Im sorry, I do not what error console is. Commented Jan 21, 2013 at 16:36
  • 2
    Right Click ==> Inspect Element ==> Click Console (if using chrome) Commented Jan 21, 2013 at 16:37

1 Answer 1

4

Because the 2 adsense js files are missing when you run locally, the rest of the javascript does not execute.

Removing references to the 2 js files fixes the issue as tested just now by me :)

Sign up to request clarification or add additional context in comments.

3 Comments

yeah? I did try it. Let me see it again.
Well i just removed the 2 js files and the call to urchin then it worked - no errors in console and the screen displayed properly
There are some references to adsense in the middle of the rest of the code... Starts with var adsense=$i('adsense');. If you don't remove that too, it doesn't work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.