Click to See Complete Forum and Search --> : Ads in forum pages corrupted
XiaoKJ
07-09-2005, 07:01 AM
Mods, there is some work waiting for you again.
Apparently, the code for ads still require tuning, since some pages still have ads that show the javascript code or the ads are duplicated in the same location.
I'm using firefox in debian unstable
just a note.
bwkaz
07-09-2005, 09:52 AM
Well, we have no control over the ad code, no access to the main JL servers, and no way of getting the internet.com web dev team to do anything. :)
However, bproffitt and JPnyc do. I'm sure they'll see this thread eventually.
In the meantime, I'll note that I get a javascript error from any pages that do what you're describing. The error is "unterminated string literal", and the code that gets shown is:
document.write('
with nothing after the opening single quote. Since the first characters shown on the page are "\n');", I would assume that these are supposed to go after the opening single quote, which would terminate the string literal. But something's closing the script tag (or something like that) early.
I'll also note that it seems to happen with just the Flash ads. (The second ad is usually a non-Flash one, also.)
Oh, wait a minute. I know what the problem is. The javascript code that runs when writing out the HTML for the Flash ad (the stuff that checks whether the Flash plugin is installed) is writing out a script tag with language set to VBScript. (And $DEITY only knows why...) When this (generated) script tag closes, the code uses:
document.write('</SCRIPT> \n');
which (since the </script> tag is not escaped) closes the running javascript section. This introduces all the later problems.
The fix is to either escape the /, like this:
document.write('<\/script> \n');
(and change the tags to lowercase while you're at it: XHTML does not allow uppercase, so if you ever try moving to it, your page will stop validating -- actually I'm not sure that it validates now, but whatever), or split the tag up, like this:
document.write('</s' + 'cript> \n');
so that it doesn't parse as </script> when the browser reads through the page.
I don't know what IE does if you try to do option 1, and most people use option 2. Note that you'll have to do this with ANY tags you close in document.write calls, because the script could be contained within any of those elements.
cybertron
07-25-2005, 05:15 PM
Ah good, so this wasn't just me then. I thought maybe Adblock was somehow doing this, but I seemed to recall having had it happen even when I wasn't using Adblock.
Any word on a resolution?
does it really matter or do you like seeing the ads instead of garbled code?
JPnyc
07-25-2005, 06:14 PM
Actually we don't have access to that code either. It's the advertiser's code, we've told them about it ad nauseum, and we don't expect much to be done about it because it only seems to happen in Firefox.
bwkaz
07-25-2005, 06:24 PM
does it really matter or do you like seeing the ads instead of garbled code? We do see the ads (both of them -- the Flash version and the non-Flash version), plus the garbled code.
I'd rather just see the Flash ad (because I have flashblock turned on, so I won't actually see any content), personally.
So I take it that this broken javascript code is being server-side included (from the ad server) as part of the ad, or something like that?
cybertron
07-25-2005, 07:03 PM
Hehe, touche' Hayl.:)
Yeah, that's a pseudo-accent because I'm too lazy to go find the real thing.
No wait, not right. Those ads pay for JL. Great things. I click on them all the time. Yeah.;)
JPnyc
07-25-2005, 07:48 PM
Sorry but you can't discuss ad blocking methods on the forum.
cybertron
07-25-2005, 07:51 PM
Sorry about that.
bwkaz
07-31-2005, 05:43 PM
Looks like it may be fixed! I'm not seeing double ads anymore, when the flash version shows up. :)
Thank the ad feed company's people for me, please! :D
ads that the ad feeds for this site seem to love to spam.