Closed
Bug 358650
Opened 18 years ago
Closed 3 years ago
updating a hidden field on a page and then accessing it through getElementsByAttribute is broken
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: chris, Unassigned)
Details
Attachments
(1 file)
1.26 KB,
application/vnd.mozilla.xul+xml
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
When you have a hidden field on a page, and then you change the value of the field in javascript. The field is no longer visible via the getElementsByAttribute method.
Reproducible: Always
Steps to Reproduce:
1.Open attached test file
2.click the buttons I have layed out in order
3.The value goes from 0 to 1 but then the item can't be found by the attrbiute
Actual Results:
the hidden item goes away.
Expected Results:
the hidden item should still be found in the
I will attach a test file to demonstrate the error. Follow the buttons on the page they are in order.
If the attachment doesn't work here is the xul file:
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="Test"
title="Test"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<script>
<![CDATA[
function showObjId() {
alert("Value: " + document.getElementById("objId").getAttribute("value") + " Form: " + document.getElementById("objId").getAttribute("form"));
}
function setObjId() {
document.getElementById("objId").setAttribute("value","1");
alert("Value Set To 1");
}
function showItemsLength() {
var items = document.getElementsByAttribute("form","test");
alert("Items: " + items.length);
}
]]>
</script>
<label hidden="true" value="" id="objId" form="test" />
<button label="1. Show Value" onclick="showObjId()" />
<button label="2. Show Items" onclick="showItemsLength()" />
<button label="3. Set Value" onclick="setObjId()" />
<button label="4. Show Value" onclick="showObjId()" />
<button label="5. Show Items" onclick="showItemsLength()" />
</window>
Reporter | ||
Comment 1•18 years ago
|
||
Attached is the test case file.
Reporter | ||
Comment 2•18 years ago
|
||
Comment on attachment 244009 [details]
test case file
ignore the overlays, they were from a file that I use in my application. Sorry for leaving them in, but they don't effect the outcome.
Updated•18 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•18 years ago
|
Assignee: nobody → general
Component: General → DOM
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.8 Branch
Reporter | ||
Comment 3•18 years ago
|
||
Any news on this. I run a software company (Med-Track.net) that depends on xul and the gecko engine (FireFox is our browser of choice), and this is a big problem for me. I am sure you guys are slammed with the release of 2.0. If I can help please let me know.
Thanks
Reporter | ||
Comment 4•18 years ago
|
||
Just curious if there any any movement on this.
Updated•15 years ago
|
Assignee: general → nobody
QA Contact: ian → general
Comment 5•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Hi Hsin
would it be ok to resolve this really old bug?
i think mozilla dropped XUL some years ago, i can´t open the file attached on this bug
regards
Flags: needinfo?(htsai)
Comment 7•3 years ago
|
||
Neil, can you confirm if this issue is still valid? Thanks!
Flags: needinfo?(htsai) → needinfo?(enndeakin)
Comment 8•3 years ago
|
||
Seems to work ok for me.
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(enndeakin)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•