0

I have looked around and not been able to find a definitive answer to this. Prototype does not work in IE 7 or lower. All other browsers work just fine. Even something as simple as toggle(); will not work in older versions of IE. I don't get any errors or anything like that. It doesn't really seem like a compatibility issue as much as it does that those browsers could be parsing the code differently?

Am I simply overlooking something here, or is this a known issue?

Thanks in advance.

2
Contributors
9
Replies
10
Views
7 Years
Discussion Span
Last Post by CFROG
0

CFrog,

First thing to check is that your document(s) have a valid doctype:

For HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

For XHTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

If in doubt, use HTML 4.01 Transitional.

Airshow

0

This is the doctype I am currently using

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

However I was incorrect when I originally stated that it was not giving me an error. The error I am receiving through older versions of IE is Object doesn't support this property or method .

0

CF, doctype looks ok.

I've had Prototype working in IE6, and I've not read anything aboubt IE7 being a probelm. That said, maybe worth your while taking a look at the Prototype site - I think there's a discussion forum.

You've got to track down that error to a line number then examine the code at that line. It could be in Prototype itself but more likely your own code where you make a Prototype call or maybe nothing to do with Prototype. Remember that javascript stalls every time it hits an uncaught error.

Airshow

0

LOL ... the chances of it being something I'm doing are better than great! I've never had a problem with Javascript as long as wasn't the one who wrote the code. I've come a long way though I'm really starting to get a handle on things.

The problem I'm facing with tracking the error down to a specific line number is that it is nowhere near accurate. I use a few includes, some of them lengthier than others. Would that throw off my line numbers?

0

CF,

That's a good point about line numbers. In standard trim, IE is not the best at being 100% helpful when debugging javascript.

There are several things you can do.

  1. Install a debugger: Microsoft do a free debugger which I understand is more than half decent (I have never used it). As far as I'm aware all other js debuggers are either paid for products, or are included in paid for products. I'm sure someone will put me right if I'm wrong.
  2. Use Douglas Crockford's JSLint, which is more of a "code inspector" than a debugger. It spots bad coding practice and is very useful for solving problems with variable scope (some of which are just about unique to javascript). JSLint can be used in (at least) two ways - online or by installing the JSLint !Yahoo Widget; you need to install the !Yahoo Widgets framework app first. Both are free.
  3. Paste all your javascript into a debug copy of the page you are developing. This is a pain in the neck but IEs standard JS error messages will give reliable line numbers.

Airshow

Edited by Airshow: n/a

0

Thanks for the advice Airshow. I'll get to work with a debugger and see if I can find where things went south.

0

Has anyone tried running Prototype in IE 8.0 compatibility mode? I was under the assumption that compatibility mode rendered the page just as it would in IE 7.0 when in fact it does not (I found a few articles on this).

I no longer run virtual machine since I upgraded to win 7 and really have no way to run an older version of IE at his time. So what I was wondering is that perhaps Prototype has no problems with older versions of IE (since I can't really test it) but instead is just misbehaving with IE 8.0 compatibility mode.

The Prototype site says it will run in both modes. Any ideas on this one?

0

CF,

That's outside my current experience, but must say it's a reasonable hypothesis.

I'm sure someone will have been there before you. and will be able to offer advice. If no luck here than maybe start a new topic with title that mentions both Prototype and IE8 comp' mode.

Good luck.

Airshow

0

Thanks Airshow, I'll start another post. What I really want to do now is get near a computer running an older version of IE to help put my mind at ease. I hate having to download and run virtual machine just for the browser.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.