Jump to content
xisto Community
Sign in to follow this  
Avalon

Firefox Doesn't Seem To Like It this line of code

Recommended Posts

When using Firefox I have noticed on the bottom of every page in the forum this peice of text...

'; window.document.write(str); }// -->
When I view the forum with Internet Explorer, the line doesn't show. Something Firefox doesn't like perhaps? Nothing appears to be missing, it's just additional text that appears. Rather odd really.

Share this post


Link to post
Share on other sites

It's not a problem with Firefox.. rather it's a small mistake in a certain block of JavaScript code that's embedded in this page. If you do View Source you'll notice this codeblock towards the end of the page:

 

<script language="javascript"><!--// must go at the bottom of the pageif (document.getElementById('contextclick') ) {str = '<script src="http://impact.contextclick.com/';str = str+'hits/html_requests.php?site_id=';str = str+'70&profile_id=45"></script>';window.document.write(str);}// --></script>

Ideally, the starting <script language="javascript"> tag should be terminated by the ending </script> tag in the last line. But if you notice carefully - the color matched ending tag occurs in the second last line within the if () {} block:

str = str+'70&profile_id=45"></script>';

 

Hence the part after that:

window.document.write(str);}// -->

- isn't being recognized as a part of the script and is being spitted out on the page.

 

I wonder why though - coz, the single and double quotes are all properly matched up.

Share this post


Link to post
Share on other sites

maybe you guys can find some bug in FireFox and they would pay you 500$ :Pi rememeber one time ago i was visiting one page but it only loads in a half then firefox gets an error... i was looking in Source with IE but i could find anything. Then after some time ( i updated FF ) i could access that page normal. :)

Share this post


Link to post
Share on other sites

So is this to say that IE is too dumb to see the error? I guess if the first </script> was removed it work properly. Just curious why FF shows it but IE doesn't.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.