Closed
Bug 287551
Opened 20 years ago
Closed 20 years ago
Custom attributes of standard HTML Tags become 'Undefined' values when manipulated with JavaScript
Categories
(Toolkit :: Form Manager, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 198643
People
(Reporter: youlikeicecream, Assigned: bugs)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.6) Gecko/20050226 Firefox/1.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.6) Gecko/20050226 Firefox/1.0.1 I tried to create additional attributes of Form objects within the HTML tags, then access them with java script and move the custom attribute to another textfield. In the HTML and Javascript code below i have defined a new attribute 'My_Label' within the text input tag. ******************************************************************************* <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="javascript" type="text/javascript"> function changetext() { var mytext = document.form1.textfield.value; var mylabel = document.form1.textfield.My_label; document.form1.textfield2.value = mylabel; } </script> </head> <body> <form name="form1" method="post" action=""> <p> <input type="text" name="textfield" value="The Value" My_label="Mieks Value"> <select name="select" onChange="changetext();"> <option selected>1</option> <option>2</option> <option>3</option> </select> <input type="submit" name="Submit" value="Submit"> </p> <p> <input type="text" name="textfield2"> </p> </form> </body> </html> ******************************************************************************* The code above works under internet explorer 6, but not under Firefox. Reproducible: Always Steps to Reproduce: 1.Go to http://alumni.oxcoder.co.uk/new_tag_test.asp 2.Change the value of the Listbox on the page Actual Results: the value 'Undefined' was put into the second textfield on the page Expected Results: the value 'Mieks Value' should have been placed in the second textfield (works under Internet Explorer 6)
Installed Firefox release 1.0.2 and still not working... (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.6) Gecko/20050321 Firefox/1.0.2)
Comment 2•20 years ago
|
||
*** This bug has been marked as a duplicate of 198643 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•