Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#7941 closed bug (worksforme)

setting .val('') for an input type="hidden" makes it inaccessible in future calls.

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.next
Component: attributes Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:


If I set the value of an input type="hidden" using $("#id").val() then future attempts to set val() fail.

This is verified by using FireBug/FireFox v3.6.

Steps to reproduce:

1) create a simple form with an input type="hidden" in it.

2) using the jQuery selector by id, set the hidden field's value using .val()

3) at any later time try to set the hidden field's value using .val('anything'). The value will not be seen in firebug, and a call to .val() returns .

Change History (5)

comment:1 Changed 12 years ago by anonymous

note that the html editor removed the ticks in the parens for val().

it should have been seen like so:


comment:2 Changed 12 years ago by Rick Waldron

Component: unfiledattributes
Owner: set to [email protected]
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!

Additionally, test against the latest jQuery release and the jQuery 0 GIT version to ensure the issue still exists. Be Excellent to eachother!

comment:3 Changed 12 years ago by jitter

Owner: [email protected] deleted
Status: pendingnew

comment:4 Changed 12 years ago by jitter

Resolution: worksforme
Status: newclosed

I made a live test case following the description in the report but couldn't verify the described behavior (tested with FF 3.6.13)

comment:5 Changed 12 years ago by [email protected]

I apologize. I have a specific page where this happens consistently but I can't share it with the public domain. When I try to create a simple page for demonstrating the issue it doesn't show the behavior. Very frustrating.

If I can build a proper test case I'll request a re-open on this ticket.

Note: See TracTickets for help on using tickets.