By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,399 Members | 1,319 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,399 IT Pros & Developers. It's quick & easy.

IE/Firefox difference: [field name] has no properties

P: 35
Experts,

My javascript application worked well until I upgraded. I use IE 6.0.29 with SP2 installed. My Firefox browser is 2.0.0.4. Prior to upgrade all worked well. Now my application works in IE but Firefox gives me error messages that read: [field name] has no properties.

The strange thing is that the screens in Firefox do transfer data between them as they are intended to do, but the windows just don't close when the window close scripts are activated. They also issue the no properties error message.

I read FAQs for explanation of the no properties error message. All I found were cases that showed code and someone suggested code changes and the result was the error message went away.

I did not find an explanation of what the no properties message means. Can anyone explain what it is intending to tell me?

Thanks.

Tom
Jun 27 '07 #1
Share this Question
Share on Google+
7 Replies


epots9
Expert 100+
P: 1,351
can we see the part of your code that its complaining about?
Jun 27 '07 #2

P: 35
OK. This script is in the second window that is sending info to the first window:

[start code:]
// function passes responses to parent; then closes this window
function doClo[seWindow() {
if (errflag == 'Y') {
alert("Please correct indicated error.");
}
// window.opener.document.apptform.hid.value = "1"; // used when debugging
else {
window.opener.document.apptform.pvt.value = visatype;
window.opener.document.apptform.pcp.value = currentposition;
window.opener.document.apptform.cpd.value = cpdescription;
window.close();
}
}
[end code]

The statement indicated in all the error messages for this window is the first one: window.opener.document.apptform.pvt.value = visatype;

I know that data is passed from this statement to the parent window because of alerts and displays. Data is passed for all three window.opener statements. But the window does not close in Firefox and it does close in IE.
Jun 27 '07 #3

100+
P: 428
Usually when a 'name' or 'id' attribute works in IE but does not return a reference to a document element in other browsers, at some point in your code you referenced an element in a way that uses IE's document.all shortcut, or you have asked for a name that was set as an id, or the reverse.
Jun 27 '07 #4

P: 35
mrhoo said: "...at some point in your code you referenced an element in a way that uses IE's document.all shortcut, or you have asked for a name that was set as an id, or the reverse."

a) what does it mean to set a name as an id or the reverse? I have not heard of that before.

b) where can I learn about ID's document.all shortcut?

Thanks for these suggested sources of my problem.

Tom
Jun 27 '07 #5

acoder
Expert Mod 15k+
P: 16,027
mrhoo said: "...at some point in your code you referenced an element in a way that uses IE's document.all shortcut, or you have asked for a name that was set as an id, or the reverse."

a) what does it mean to set a name as an id or the reverse? I have not heard of that before.
In other words, you may have set an id for an element, e.g.
[HTML]<div id="test"></div>[/HTML] but you're trying to access it as a name, or vice versa, i.e. you've only set a name and you're trying to access the element by its id.
b) where can I learn about ID's document.all shortcut?
You don't want to really learn about that. What you should be using instead is document.getElementById - see this.
Jun 28 '07 #6

P: 35
In other words, you may have set an id for an element, e.g.
[HTML]<div id="test"></div>[/HTML] but you're trying to access it as a name, or vice versa, i.e. you've only set a name and you're trying to access the element by its id.

You don't want to really learn about that. What you should be using instead is document.getElementById - see this.
Thanks, ACODER. I appreciate your insightful reply and also directing me to the W3 site! That should fix this problem.
Jul 12 '07 #7

acoder
Expert Mod 15k+
P: 16,027
Thanks, ACODER. I appreciate your insightful reply and also directing me to the W3 site! That should fix this problem.
No problem, you're welcome.
Jul 13 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.