Zen Cart Logo
Forums / General Questions / Fine in Fire Fox - Flock but Chokes on IE Why?

Fine in Fire Fox - Flock but Chokes on IE Why?

Locked

Views: 1,751

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
11 Jul 2008, 2:05 PM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

This is the type of problem that again shows, Validating one's code is a good thing. :smile:

Line 54, Column 31: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified .

document.write("<script id=__ie_onload defer></script>");

As I'm not sure exactly what you are doing, it should be written as:

document.write("<script id="__ie_onload**"** defer></script>");

or

document.write("<script id="__ie_onload defer**"**></script>");

After making the above correction you may still have one or two more errors that need correcting.

Also, are you sure the file was uploaded correctly?

      .replace('/^mailto:/', 'mailto/');
    // alert(link); return false; //**òåñòèðîâàíèå**
    pageTracker._trackPageview(link);
  }
);
//**îòñëåæèâàíèå äîïîëíèòåëüíûõ ýëåìåíòîâ**

What's Bolded doesn't seem like it should be there. Even though Commented out, whenever I see something like that I always re-upload the file; because to my knowledge it shouldn't be there. But then again, that's just me. :wink:

11 Jul 2008, 4:04 PM
#3
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

Thanks for looking into this.

Can you tell me which file has to be edited?
I think its product listing template.
Ill try to use the Developers Tool Kit and see if I can find it.

11 Jul 2008, 4:11 PM
#4
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

includes/templates/CUSTOM/jscript/jscript_googleanalytics_outgoing.php

Hmmmmm.....

11 Jul 2008, 4:19 PM
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

Google's javascript is notorious for causing validation errors. I wonder if they test it against HTML, but not XHTML <speculation>

11 Jul 2008, 4:20 PM
#6
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

Removed the file for now.

I guess google analytics wont work.

But buys me time while I work on other things.

11 Jul 2008, 4:27 PM
#7
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

<?php /** * jscript_googleanalytics_outgoing.php * * @package zen-cart statistic * @copyright Copyright 2004-2008 Andrew Berezin eCommerce-Service.com * @copyright Copyright 2007 <http://designformasters.info/posts/google-analytics-advanced-use/> * @copyright Portions Copyright 2003-2008 Zen Cart Development Team * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: jscript_googleanalytics_outgoing.php, v 2.1.2 21.02.2008 11:04 Andrew Berezin $ */ // <http://www.google.com/support/googleanalytics/bin/static.py?page=troubleshooter.cs&problem=tracking&selected=tracking_outbound> /* Google Analytics provides an easy way to track clicks on links that lead away from your site. Because these links do not lead to a page on your site containing the UTM JavaScript, you will need to tag the link itself. This piece of JavaScript assigns a pageview to any click on a link - the pageview is attributed to the filename you specify. For example, to log every click on a particular link to <https://www.example.com> as a pageview for "/outgoing/example_com" you would add the following attribute to the link's tag: <a href="http://www.example.com" onClick="javascript: pageTracker._trackPageview('/outgoing/example.com');"> It is a good idea to log all of your outbound links into a logical directory structure as shown in the example. This way, you will be able to easily identify what pages visitors clicked on to leave your site. */ @define('GOOGLE_ANALYTICS_TRACKING_OUTBOUND', 'true'); @define('GOOGLE_ANALYTICS_TRACKING_OUTBOUND_LINKS_PREFIX', '/outgoing/'); if(GOOGLE_ANALYTICS_TRACKING_OUTBOUND == 'true') { ?> <script type="text/javascript"> var addListener = function() { if ( window.addEventListener ) { return function(el, type, fn) { el.addEventListener(type, fn, false); }; } else if ( window.attachEvent ) { return function(el, type, fn) { var f = function() { fn.call(el, window.event); }; el.attachEvent('on'+type, f); }; } else { return function(el, type, fn) { element['on'+type] = fn; } } }(); <?php /* <http://webo.sunnybear.ru/articles/habrahabr/05-delayed-loading/> */ ?> function domReady(init) { /* for Mozilla */ if (document.addEventListener) { document.addEventListener("DOMContentLoaded", init, false); return; } /* for Internet Explorer */ /*@cc_on @*/ /*@if (@_win32) document.write("<script id=__ie_onload defer><\/script>"); var script = document.getElementById("__ie_onload"); script.onreadystatechange = function() { if (this.readyState == "complete") { init(); // call the onload handler } }; return; /*@end @*/ /* for Safari */ if (/WebKit/i.test(navigator.userAgent)) { // sniff var _timer = setInterval(function() { if (/loaded|complete/.test(document.readyState)) { init(); // call the onload handler } }, 10); return; } /* for other browsers */ window.onload = init; return; } function isLinkExternal(link) { var r = new RegExp('^https?://(?:www.)?' + location.host.replace(/^www./, '')); return !r.test(link); } domReady( function() { addListener(document, 'click', function(e) { var target = (window.event) ? e.srcElement : e.target; while (target) { if (target.href) break; target = target.parentNode; } if (!target || !isLinkExternal(target.href)) return true; var link = target.href; link = '<?php echo GOOGLE_ANALYTICS_TRACKING_OUTBOUND_LINKS_PREFIX; ?>' + link.replace(/:\/\//, '/') .replace('/^mailto:/', 'mailto/'); // alert(link); return false; //òåñòèðîâàíèå pageTracker._trackPageview(link); } ); //îòñëåæèâàíèå äîïîëíèòåëüíûõ ýëåìåíòîâ //addListener(document.getElementById('element-id'), // 'click', function() { pageTracker._trackPageview('/element-id/'); }); } ); </script> <?php } // <http://www.google.com/support/googleanalytics/bin/static.py?page=troubleshooter.cs&problem=tracking&selected=tracking_downloads&ctx=tracking_tracking_downloads_55529> /* Google Analytics provides an easy way to track clicks on links that lead to file downloads. Because these links do not lead to a page on your site containing the tracking code, you'll need to tag the link itself with the _trackPageview() JavaScript if you would like to track these downloads. This piece of JavaScript assigns a pageview to any click on a link - the pageview is attributed to the filename you specify. For example, to log every click on a particular link to <https://www.example.com/files/map.pdf> as a pageview for /downloads/map you would add the following attribute to the link's <a> tag: <a href="http://www.example.com/files/map.pdf" onClick="javascript: pageTracker._trackPageview('/downloads/map'); "> */ ?>

If anyone knows of a fix please let me know

11 Jul 2008, 5:03 PM
#8
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

Are you saying the fix provided in Post #2 of this thread didn't help?

11 Jul 2008, 5:34 PM
#9
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

Oh I forgot about that... Sorry once I found it...

Let me try it...

11 Jul 2008, 6:58 PM
#10
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

document.write("<script id="__ie_onload defer"></script>");

The 2nd one did the trick. Thanks!

11 Jul 2008, 7:07 PM
#11
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

Oh by the way....

My site('s) are even running much faster now.

Thanks so much!

11 Jul 2008, 7:40 PM
#12
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

You might more than one file to change.

http://www.allforyourwedding.com/index.php?main_page=product_info&cPath=250&products_id=2114

shows me:

}
/* for Internet Explorer /
/
@cc_on @/
/
@if (@_win32)
document.write("<script id="__ie_onload**"** defer></script>");

But you had said this works:

document.write("<script id=**\"**__ie_onload defer**\"**><\/script>");
12 Jul 2008, 1:00 AM
#13
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

Do you think you would have any idea which file I would have to edit for that one?
When I tried Developers tool kit I could only find the file mentioned earlier.

I am getting an error in IE only for that link as well

12 Jul 2008, 1:10 AM
#14
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

I made what I thought was the same change again.

Perhaps its there twice.

Kindly check the link again and let me know if you see anything else.

12 Jul 2008, 9:45 AM
#15
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

The page mentioned previously still does not work in IE 6. Not sure what the problem is but you've got a tough nut to crack.

12 Jul 2008, 11:30 AM
#16
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Fine in Fire Fox - Flock but Chokes on IE Why?

Its working in My IE6 w Service pack 2.

You debugged before. Anyway to check again?