Ads not displaying in FF?

Status
Not open for further replies.

misterspock

New Member
Messages
85
Reaction score
0
Points
0
Hello,

If you visit http://buufdesigns.com, you will see that there is a beige rectangle in the center of the page. However, there is suppose to be text ad (which x10hosting requires). The odd thing about this, it appears on IE but not on FF. What am I doing wrong with the coding of this advert?

Thanks.
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
I just disabled everything on my copy of firefox (adblockplus and noscript) and neither is fixing the error. Which is strange since I'm using ALMOST the exact same code on my site.

I say almost because of this phrase JUST before the commented out code starts:
Code:
<script language='JavaScript' type='text/javascript'>
<!--
   if (!document.phpAds_used) document.phpAds_used = ',';
   phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

   document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
   document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
   document.write ("&what=zone:3&target=_blank");
   document.write ("&exclude=" + document.phpAds_used);
   if (document.referrer)
      document.write ("&referer=" + escape(document.referrer));
   document.write ("'><" + "/script>");
//-->

In yours you have
Code:
<script type="text/javascript"> 
<!-- 
   if (!document.phpAds_used) document.phpAds_used = ','; 
   phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11); 
    
   document.write ("<" + "script language='JavaScript' type='text/javascript' src='"); 
   document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random); 
   document.write ("&what=zone:3&target=_blank"); 
   document.write ("&exclude=" + document.phpAds_used); 
   if (document.referrer) 
      document.write ("&referer=" + escape(document.referrer)); 
   document.write ("'><" + "/script>"); 
//-->

Right at the beginning, mine has "script LANGUAGE='javascript' type='text/javascript'", where yours just has the type.

My bet is because firefox obeys the web standards and IE doesn't, firefox looks at that script tag and goes "Doesn't specify a language, it's not a script that needs to be ran." Ie on the other hand goes "oh, type is text/javascript, therefore the language is javascript."

Just a guess but it'd probably explain it.



EDIT: Oh, and also, firefoxe's source viewer is showing the js code in green on your site, which by default is comments. On mine it's just showing it as black (generic text). Try adding in that language part and see if it fixes it.
 
Last edited:

Derek

Community Support Force
Community Support
Messages
12,882
Reaction score
186
Points
63
I dont see it later wait till an admin looks at it..
 

misterspock

New Member
Messages
85
Reaction score
0
Points
0
It's odd, since I used the same code before making changes with my website.

FF should recognize the text/javascript.
 
Last edited:

bigguy

Retired
Messages
10,984
Reaction score
10
Points
38
have you read the rules. ??? The ad code is not to be modified.
 

misterspock

New Member
Messages
85
Reaction score
0
Points
0
I did the read the rules and used the code appropriately to xhtml standards.

Just me a couple of days, I will try to figure out why it's doing this.

Update: problem solved, for some apparent reason, the xhtml.php (coded validator) interfered with the code for some apparent reason.
 
Last edited:

t2t2t

New Member
Messages
690
Reaction score
0
Points
0
have you read the rules. ??? The ad code is not to be modified.

Speaking about modifications, i may not be a whiz in JavaScript, but i do know, that following codes should work as well and they are shorter and easier to use:

NB! Don't use these codes(, yet)!

document.write(s) merged:
Code:
<script language='JavaScript' type='text/javascript'>
<!--
   if (!document.phpAds_used) document.phpAds_used = ',';
   phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
   document.write ("<script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adjs.php?n=" + phpAds_random + "&what=zone:3&target=_blank&exclude=" + document.phpAds_used);
   if (document.referrer) document.write ("&referer=" + escape(document.referrer));
   document.write ("'></script>");
//-->
</script><noscript><a href='http://x10hosting.com/advert/adclick.php?n=a915c788' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:3&n=a915c788' border='0' alt=''></a></noscript>
Length: 9 rows

Same with PHP only (Yes, its possible):
PHP:
<?
if (!$phpAds_used) $phpAds_used = ',';
$phpAds_random = mt_rand();
print "<script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adjs.php?n=$phpAds_random&what=zone:3&target=_blank&exclude=$phpAds_used";
if ($_SERVER[HTTP_REFERER]) print "&referer=". $_SERVER[HTTP_REFERER];
print "'></script>";
print "<noscript><a href='http://x10hosting.com/advert/adclick.php?n=a915c788' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:3&n=a915c788' border='0' alt=''></a></noscript>";
?>
Code seen by viewer: (Source)
HTML:
<script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adjs.php?n=46987645&what=zone:3&target=_blank&exclude=,'></script><noscript><a href='http://x10hosting.com/advert/adclick.php?n=a915c788' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:3&n=a915c788' border='0' alt=''></a></noscript>
Length: 6 rows (without <? ?> tags)

While remaking codes, i also noticed something on the <noscript> part:
Code:
<img src='http://x10hosting.com/advert/adview.php?what=zone:3&n=a915c788' border='0' alt=''>
If you would look at that file at src, its empty 1x1 picture. This could be why no ads are shown on Firefox or maybe even some other browser that Mozilla.

I think that some changes are required to ad code.

Now i would just love to see Corey's Reply.
 
Status
Not open for further replies.
Top