logon fails to exchange server unless full DC is specified




JavaScript Engine
14 years ago
5 years ago


(Reporter: joeja, Unassigned)



Firefox Tracking Flags

(Not tracked)




14 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803

If the DC = MSI.local a user should be able to put in their username and the
javascript should be able to prepend the MSI.local.

This line of Javascript fails:

 if( typeof(logonForm) && typeof(logonForm.username) &&
typeof(logonForm.username.value) )
// do whatever

the name of the form is logonForm and their is a field called username. 

Reproducible: Always
Steps to Reproduce:
1. create a form and give the form a name
2. create some javascript that uses the typeof(formname)
3. look at javascript console
4. it fails

Actual Results:  
It returns undefined

Expected Results:  
It should return the typeof form, I'd think.  I can't find this in the spec though.
typeof *always* returns a non-empty string, so that condition is vacuously true.
 Try attaching a real testcase of what you think should work -- and file the bug
against DOM Level 0 if you are complaining about DOM, not JS engine, issues.

Last Resolved: 14 years ago
Resolution: --- → INVALID

Comment 2

14 years ago
<script language="JavaScript">
function testtype() {                                                          
        var bar = new String("this is a test!");                               
        alert("this works -> " + typeof(bar));                                 
        if ( typeof(foo) ) {
                alert("But this doesnt -> " + typeof(foo));
        var obj = document.foo;                                                
        alert(" This also works -> " + typeof(obj) );                          

<form name="foo" action="test.jsp">                                            
<input type="button" onclick="testtype();" value="test button">

Hmm, there is the test case.  Should foo return undefined or true?  It returns
undefined.  I have no idea what the correct behavior should be or if this is DOM
related or JavaScript.  Since the code is JavaScript I'd guess JavaScript. 
Since I am not a mozilla coder I have no idea where you people do what.  If you
think this is a DOM bug or not a bug at all then please say so.  

This code works in other browsers I have tested it with.  In other browsers
typeof returns Object in all 3 cases.  Is typeof() a JavaScript thing or DOM?  

Joe: try to learn, that's all we can ask if you want to participate in bugzilla
and be effective.  I'm not asking you to go back in time and fix the misfiled
bug, I'm telling you something for next time.

In what other browsers have you tested?  Sounds like only in IE.  IE puts forms
and other named elements in the window scope, so you can say "foo" and mean the
form named document.foo in all browsers since Netscape 2.  Please do not use the
IE-only way of naming forms; just use document.foo for code that works in all

Also, your script comes before the form, which means you are assuming the
document object model is built before scripts run.  That too is not a portable

This is a dup of the bug about Mozilla not emulating IE's non-standard pollution
of the window scope with named document objects.

Whiteboard: DUPEME

Comment 4

14 years ago
As far as the location of the script.  It can go anywhere in the page, because
the page needs to be loaded before someone can click the button to execute the
script.  That's really neither here nor there as that is not the issue.  

IE and Konqueror 3.2 BOTH seem to work with this behavior so I guess they both
put the elements in the window scope.

I do code using document.formName.foo.  

If you read this whole post, including the title you would see that it says:

logon fails to exchange server unless full DC is specified

its not MY js that's broken, its Microsoft Exchange Server that is doing this in
SBS 2003.


5 years ago
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.