Closed Bug 305481 Opened 19 years ago Closed 19 years ago

defaultValue does not stick for form fields of type hidden

Categories

(Firefox :: General, defect)

x86
Windows Server 2003
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 205618

People

(Reporter: peterd, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

This alert box in the html code below should print out 'right' rather than
'wrong'.  Which FWIW is also IE's behavior.

<FORM METHOD=POST>
<INPUT TYPE=HIDDEN NAME=hidetest VALUE='right'>
<INPUT TYPE=SUBMIT VALUE=Continue>
</FORM>

<SCRIPT>
document.forms[0].hidetest.value = 'wrong';
alert(document.forms[0].hidetest.defaultValue);
</SCRIPT>




Reproducible: Always

Steps to Reproduce:
1.Paste the html script into a file
2.Open the file
3.

Actual Results:  
Alert prints 'wrong'

Expected Results:  
Alert prints 'right'

*** This bug has been marked as a duplicate of 205618 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.