views:

699

answers:

1

On the following page, the orange "Buy Topo Map" link will open a page in IE7 (and Firefox and Safari), but not in IE8. The link is in the top-left.

http://www.trailbehind.com/node/1148091/

I am using the following code to create the link:

var a = dec('a');
a.className = 'jLink';
a.style.fontWeight = 'bold';
a.style.color = '#CC5500';
a.style.fontSize = '.8em';
a.target = '_blank';
a.href = 'http://www.mytopo.com/searchgeo.cfm?lat=' + map.target.la + '&lon=' + map.target.lo+'&pid=trailbehind';
a.onclick = function () {
  pageTracker._trackEvent("Orange Link", "Buy Topo Map", this.href);
  return true;
}
a.appendChild(dct('Buy Topo Map'));

What's the matter?

A: 

Works fine for me, although IE8's devtools indicate the following runtime error:

Line: 323 Error: 'pageTracker' is null or not an object

EricLaw -MSFT-
Thanks, pageTracker is in fact the culprit.
Andrew Johnson
Oops, I take it back. The problem seems to be that IE8 doesn't like a.target = '_blank';
Andrew Johnson
I saw a comment on the IE8 blog that says "HTML 4.01 Strict does not allow for target=_blank" - http://blogs.msdn.com/ie/archive/2009/01/21/yes-we-did.aspx
Kevin Hakanson
While that is true (and Expression Web shows it) IE8 doesn't enforce that. See http://www.debugtheweb.com/test/strict.htm for a demo.In another thread you suggested that you got a "class not registered" error when using this page. That suggests to me that your IE8 install is corrupted.
EricLaw -MSFT-