Hello, I have never used javascript before, so this might be a very basic question. I have a script on my blog which places a stumbleupon button on the page.
This is the code that calls the script:
Code:
<script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>
Today I went to my blog and it was taking a long time to load, it turns out because stumbleupons site is down so the script can't be accessed. A whole lot of other stuff on the page just doesn't load until it times out though, so it takes like 3 minutes for the page to load.
What I want to know is can I test if the script is reachable and only call it if it is, so that if there is a 403 or 404 error it just won't even try to load it and continue loading the rest of the page??
Any help is greatly apprectiated!
Thanks.