Bug Tracker

Modify

Ticket #7941 (closed bug: worksforme)

Opened 2 years ago

Last modified 15 months ago

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

Reported by: dwhalen@… Owned by:
Priority: undecided Milestone: 1.next
Component: attributes Version: 1.4.4
Keywords: Cc:
Blocking: Blocked by:

Description

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

comment:1 Changed 2 years ago by anonymous

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

it should have been seen like so:

$('#id').val('')

comment:2 Changed 2 years ago by rwaldron

  • Owner set to dwhalen@…
  • Status changed from new to pending
  • Component changed from unfiled to attributes

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 2 years ago by jitter

  • Owner dwhalen@… deleted
  • Status changed from pending to new

comment:4 Changed 2 years ago by jitter

  • Status changed from new to closed
  • Resolution set to worksforme

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 2 years ago by dwhalen@…

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.