| View previous topic :: View next topic |
| Author |
Message |
Swiss James

Joined: 26 Nov 2003 Location: Shanghai
|
Posted: Wed Apr 27, 2005 9:06 pm Post subject: JavaScript problems |
|
|
Soo, I've decided to sell out and get some google advertising on my site- but now that I've got it all plugged in and ready to roll, I find that Internet Explorer doesn't always display the advert box.
This troubles me.
I've always had problems with integrating other people's scripts (e.g. for comments, stats) in my site, they seem very temperamental.
Are you supposed to close the </script> tag after each function, even when you're just going to open it up again in the next line of code? Is there anything you need to be careful of when using
<!--
..
..
// End -->
tags to comment out scripts for those that can't handle them?
I've validated my code with the W3C tool
http://validator.w3.org/check?uri=http%3A%2F%2Flostseouls.com%2Fblog.php%3Fdate%3Dlatest&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&ss=1 and the only errors I've got seem to be explicitly closing tags that are implicitly closed, but this is in the code that Google gave me which I'm not supposed to change.
I'm also suspicious that the site won't fly in Safari now, as I've had similar problems with this before (and can't get onto browsercam.com to find out) |
|
| Back to top |
|
 |
shawner88

Joined: 01 Feb 2003
|
Posted: Thu Apr 28, 2005 6:44 am Post subject: |
|
|
| Try removing the advertising. See if that works. |
|
| Back to top |
|
 |
The King of Kwangju

Joined: 10 Feb 2003 Location: New York City
|
Posted: Thu Apr 28, 2005 1:54 pm Post subject: Re: JavaScript problems |
|
|
Nothing wrong with your javascript, james.
I just did a quick check in ie 5, 5.5 and 6 and the ads came up fine. What version are you having trouble with?
Its possible they didn't display once or twice because Google couldn't serve up the ads quickly enough. Weird, but possible.
| Swiss James wrote: |
| Are you supposed to close the </script> tag after each function, even when you're just going to open it up again in the next line of code? |
No. Just dump all your functions into one <script>
What'd I tell you about that validator? It's based on the ideal, not what people are using. Google itself doesn't validate.
But if you were worried about validation, you could remove those closing tags and test your Google search again to make sure it still works (it should). |
|
| Back to top |
|
 |
Swiss James

Joined: 26 Nov 2003 Location: Shanghai
|
Posted: Thu Apr 28, 2005 4:10 pm Post subject: |
|
|
IE 6.0, it's very shaky, sometimes they come up, sometimes they don't.
All I'm worried about is that it'll come to the end of the month and Google will accuse me of not displaying their ads properly and take their ball home- frankly I could care less if they don't come up.
Anyway thanks for checking that King- and I see your point about that validator- strange as I thought w3.org was as close to an agreed standard that the web had. |
|
| Back to top |
|
 |
|