Beacon11
04-24-2008, 11:17 PM
Hello all. I'm having an Internet Explorer (both 6 and 7) issue. It's a javascript problem, and as I'm not much of a javascript developer, it's going over my head. Please note that this works perfectly on Firefox and Safari... just not the IE's.
I am a Ruby on Rails developer, and I am using the Prototype Window Class. The basic idea of what I'm doing is this: I have a summary page of an item that a user created. This item can have pictures, files, etc. This summary page lists all of these attachments. Next to the name of the attachments is a 'delete' button. When you click the delete button, a modal is supposed to pop and ask if you're sure you want to delete- it covers the everything but the popup in a faint blue haze, and makes you click yes or no before you do anything else. Fairly simple. Now.. I could figure out a simple IE workaround, by doing something different for IE browsers... but I don't want to. This effect is so pretty, I'd like it to work on everything.
Here's my problem: I'm including all these external javascript files, so the header of my page looks like the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<script src="/javascripts/prototype.js" type="text/javascript"></script>
<script src="/javascripts/effects.js" type="text/javascript"></script>
<script src="/javascripts/dragdrop.js" type="text/javascript"></script>
<script src="/javascripts/controls.js" type="text/javascript"></script>
<script src="/javascripts/application.js" type="text/javascript"></script>
<script src="/javascripts/fckeditor/fckeditor.js" type="text/javascript"></script>
<script src="/javascripts/hnav.js" type="text/javascript"></script>
<script src="/javascripts/window.js" type="text/javascript"></script>
<script src="/javascripts/window_effects.js" type="text/javascript"></script>
<script src="/javascripts/debug.js" type="text/javascript"></script>
<link href="/stylesheets/main.css" media="all" rel="stylesheet" type="text/css" />
<link href="/stylesheets/pages.css" media="all" rel="stylesheet" type="text/css" />
<link href="/stylesheets/themes/default.css4" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/themes/alphacube.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/themes/alert.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/hnav.css" media="all" rel="stylesheet" type="text/css" />
....
The error I get in IE is this:
Line: 116
Character: 5
Code: 0
Error Message: Object doesn't support this property or method
Oh... so descriptive. First of all... what line is it talking about, when I have all those included javascript files? Line 116 of prototype.js? Or maybe... 116 - 9 = line 107 of prototype.js? I'm a little lost as to where to start with this error message. Any suggestions?
If needed... the entire function in prototype.js of line 107/116 is this (with line numbers):
107
108 Object.extend(Object, {
109 inspect: function(object) {
110 try {
111 if (Object.isUndefined(object)) return 'undefined';
112 if (object === null) return 'null';
113 return object.inspect ? object.inspect() : String(object);
114 } catch (e) {
115 if (e instanceof RangeError) return '...';
116 throw e;
117 }
118 },
I apologize, as I can't provide a link to this so you can check it out. However, if you download my attachment, you'll find the sample in there: windows_js/samples/popup_open.html. The one I'm using is the third one, on the button. The text is "Do you like this effect?" and uses the openDialog3(html). Notice that works fine on FF and safari, but not in IE. Any suggestions as to a fix would be MOST appreciated!
I am a Ruby on Rails developer, and I am using the Prototype Window Class. The basic idea of what I'm doing is this: I have a summary page of an item that a user created. This item can have pictures, files, etc. This summary page lists all of these attachments. Next to the name of the attachments is a 'delete' button. When you click the delete button, a modal is supposed to pop and ask if you're sure you want to delete- it covers the everything but the popup in a faint blue haze, and makes you click yes or no before you do anything else. Fairly simple. Now.. I could figure out a simple IE workaround, by doing something different for IE browsers... but I don't want to. This effect is so pretty, I'd like it to work on everything.
Here's my problem: I'm including all these external javascript files, so the header of my page looks like the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<script src="/javascripts/prototype.js" type="text/javascript"></script>
<script src="/javascripts/effects.js" type="text/javascript"></script>
<script src="/javascripts/dragdrop.js" type="text/javascript"></script>
<script src="/javascripts/controls.js" type="text/javascript"></script>
<script src="/javascripts/application.js" type="text/javascript"></script>
<script src="/javascripts/fckeditor/fckeditor.js" type="text/javascript"></script>
<script src="/javascripts/hnav.js" type="text/javascript"></script>
<script src="/javascripts/window.js" type="text/javascript"></script>
<script src="/javascripts/window_effects.js" type="text/javascript"></script>
<script src="/javascripts/debug.js" type="text/javascript"></script>
<link href="/stylesheets/main.css" media="all" rel="stylesheet" type="text/css" />
<link href="/stylesheets/pages.css" media="all" rel="stylesheet" type="text/css" />
<link href="/stylesheets/themes/default.css4" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/themes/alphacube.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/themes/alert.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/hnav.css" media="all" rel="stylesheet" type="text/css" />
....
The error I get in IE is this:
Line: 116
Character: 5
Code: 0
Error Message: Object doesn't support this property or method
Oh... so descriptive. First of all... what line is it talking about, when I have all those included javascript files? Line 116 of prototype.js? Or maybe... 116 - 9 = line 107 of prototype.js? I'm a little lost as to where to start with this error message. Any suggestions?
If needed... the entire function in prototype.js of line 107/116 is this (with line numbers):
107
108 Object.extend(Object, {
109 inspect: function(object) {
110 try {
111 if (Object.isUndefined(object)) return 'undefined';
112 if (object === null) return 'null';
113 return object.inspect ? object.inspect() : String(object);
114 } catch (e) {
115 if (e instanceof RangeError) return '...';
116 throw e;
117 }
118 },
I apologize, as I can't provide a link to this so you can check it out. However, if you download my attachment, you'll find the sample in there: windows_js/samples/popup_open.html. The one I'm using is the third one, on the button. The text is "Do you like this effect?" and uses the openDialog3(html). Notice that works fine on FF and safari, but not in IE. Any suggestions as to a fix would be MOST appreciated!