Closed
Bug 177888
Opened 23 years ago
Closed 23 years ago
relata.org - Coding error: site hard-codes |form.elements[3]| for Mozilla
Categories
(Tech Evangelism Graveyard :: English US, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Oct
People
(Reporter: andremachado, Assigned: bc)
References
()
Details
(Whiteboard: [TECHNOTE-NEEDED])
User-Agent: Mozilla/5.0 (compatible; Konqueror/3; Linux 2.4.19-1U80_2cl; X11; i586; pt_BR)
Build Identifier: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2b) Gecko/20021017
Sir:
Trying to run Relata 0.3.0 from http://www.relata.org using Mozilla newer than
0.9.6 (tested by Relata developers) accounts screen does not show list of
available contacts.
Someone else, as you can read at cited url of the forum tracked the problem to
a javascript options.length instruction that works on IE.
Date: 08-01-02 16:06
I have traced this down to what appears to be a Javascript error using Mozilla
1.01. The error is:
f.elements[elid].options has no properties
source file: account/account.js-----line 38
is the options.length property exclusive to IE?
---
It seems that previous 0.9.6 had this javascript implemented.
Best regards.
Reproducible: Always
Steps to Reproduce:
1. login into a relata account.
2. create a contact
3. try to create an account or oipportunity
4. both fail because need at leat one contact associated. And the list of
available contacts is displayed empty on Mozilla.
Actual Results:
It is impossible to create an account or opportunity on Relata, using Mozilla.
Only using IE 5.5 or above.
Expected Results:
Mozilla should implement the javascript instruction as expected, so the
contacts available list will be shown right.
Please, contact www.relata.org developer team for exact technical details.
| Reporter | ||
Comment 1•23 years ago
|
||
Hello,
It is possible to me to create a test login into my relata 0.3.0 web
installation, in order to you quickly see the problem using Mozilla and how IE
5.5 and above works right.
Best regards.
Andre Felipe
Summary: javascript options.length → javascript options.length
Comment 2•23 years ago
|
||
Such a login would be nice... at a guess, "f.elements[elid].options" is null in
mozilla for some reason...
| Reporter | ||
Comment 3•23 years ago
|
||
Hello,
Please, see the url
http://www.techforce.com.br/util/relata
login: mozilla
password: demo
After you login, a new screen will allow to create a contact.
See how the relata tool bar under menu bar is partially tucked on Mozilla.
After creating a contact, John Doe, press account button to try create an
account.
No contacts available to move to right pane.
The relata program pops an error msg when trying to Ok the account without an
associated contact.
Best regards.
Andre Felipe
Comment 4•23 years ago
|
||
> After you login, a new screen will allow to create a contact.
You forgot to mention "disable popup blocking"; that would have been very helpful.
> if(document.all) elid = 4;
> else elid = 3;
What exactly is the point of that code? IE and Mozilla are using different
values of elid after this point... Does making elid always 4 help?
Comment 5•23 years ago
|
||
Confirming bug using Mozilla trunk binary 20021015xx on WinNT.
OS: Linux ---> All
I have logged in to the URL as described in Comment #3 and created
a contact named "John Doe". If we follow the steps to reproduce, we
go deeper and deeper into nested frames. In order to debug this, we
need to break out of the hierarchy of frames:
1. Login to http://www.techforce.com.br/util/relata
using IE and Mozilla (login=mozilla, password=demo)
2. This sets your session ID, etc. and brings up a child window with
navigation buttons ("Contacts", "Accounts", "Opportunities", etc.)
3. x-dismiss the child window; we don't want to use it
4. In the parent window, put this URL and hit <Enter>:
http://www.techforce.com.br/util/relata/account/add.php
5. This brings us directly to the "Account Add" page with the problem.
In IE6, it works fine: "Doe, John" appears in the "Available contacts"
selectbox. In Mozilla, however, this selectbox is EMPTY and we have
this error in the JavaScript Console:
Error: f.elements[elid].options has no properties
Source File: http://www.techforce.com.br/util/relata/account/account.js
Line: 38
6. The error is caused by this function:
// called when loading a new record to clear the array
function clear_account_contacts()
{
f.elements[elid].options.length = 0; <<<------------------- LINE 38
f.avail_contacts.options.length = 0;
}
7. The global variable |elid| is defined at the top of the file as follows:
if(document.all) elid = 4;
else elid = 3;
f = document.accounts_form;
This shows that IE is given f.elements[4], which is a selectbox.
Hence no error in IE when we access the |options| of this element.
But Mozilla is given f.elements[3] instead. This is not a selectbox,
but a button!!! Hence the error.
8. To see this, enter this javascript:URL into the URL bar and <Enter>:
javascript: var msg = 'i\t name \t\ttype \n'; for (var i=0; i<f.elements.length;
i++) {msg += '\n' + i + '\t' + f.elements[i].name + '\t' + f.elements[i].type};
alert(msg);
9. Both Mozilla and IE show the same list of elements in the same order.
For some reason, the site thinks Mozilla will have the selectbox
at index=3 in the |f.elements| array, instead of index=4 where it
really is, in Mozilla as well as in IE.
Reassigning to Tech Evangelism component -
Assignee: rogerl → susiew
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → US General
Ever confirmed: true
OS: Linux → All
Product: Browser → Tech Evangelism
QA Contact: pschwartau → zach
Version: other → unspecified
Comment 6•23 years ago
|
||
As a note, if the site uses an <object> in the form, then form.elements
numbering will be off by 1 in Netscape and old Mozilla builds... That could be
the original motivation for that code.
ccing bclary, since we need to evang the toolmaker...
Updated•23 years ago
|
Summary: javascript options.length → Coding error: site hard-codes |form.elements[3]| for Mozilla
Comment 7•23 years ago
|
||
A variable |selectid| is also given a different value in Mozilla.
The code occurs in-line this time, with an explicit comment:
<script type="text/javascript">
// reference the form element that associates contacts w/ an account
// its different in IE & Mozilla
if(document.all) selectid = 4;
else selectid = 3;
</script>
There may be even more instances like this to correct -
| Assignee | ||
Comment 8•23 years ago
|
||
So, the issue is that in builds before 0.9.6, we would not count objects as form
elements and they would not appear in the form.elements nodelist. If that is the
case, I would recommend to them: forget anything before 1.0, and code IE/Gecko
the same. Is that correct?
Comment 9•23 years ago
|
||
Not sure where the 0.9.6 number came from... We started adding <object> to
.elements with the fix of bug 127847 which made it into 1.2alpha but not 1.1 and
certainly not 1.0.x
| Assignee | ||
Comment 11•23 years ago
|
||
contacted at bugs@relata.org
Status: NEW → ASSIGNED
Whiteboard: [TECHNOTE-NEEDED]
Target Milestone: --- → Dec
| Assignee | ||
Updated•23 years ago
|
Severity: normal → blocker
Summary: Coding error: site hard-codes |form.elements[3]| for Mozilla → relata.org - Coding error: site hard-codes |form.elements[3]| for Mozilla
| Assignee | ||
Comment 12•23 years ago
|
||
is this still an issue? I get the / stripped out of the url when I visit
http://www.relata.org/phorum/read.php?f=5&i=1201&t=1201
Target Milestone: Dec → Oct
| Reporter | ||
Comment 13•23 years ago
|
||
Hello,
The relata.org team decided to close the source, closed the forums, after using
the community to clean bugs and improve product during the gpl era, changed to
hosted service model to relata.com and to tie product on IE.
So, I ask to close this ticket.
Many thanks for your attention.
Andre Felipe
| Assignee | ||
Comment 14•23 years ago
|
||
ok. thanks for the update.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•