Opened 14 years ago
Closed 13 years ago
#6331 closed bug (worksforme)
BUG on Setting value to hidden input
Reported by: | jennal | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.4.3 |
Component: | manipulation | Version: | 1.4.2 |
Keywords: | val | Cc: | |
Blocked by: | Blocking: |
Description
I try to set a long html to a input:text, it is ok. But when I set the input to hidden, then set the same html value to it. The input gone.
Please see attach.
Attachments (1)
Change History (2)
Changed 14 years ago by
Attachment: | test2.html added |
---|
comment:1 Changed 13 years ago by
Priority: | → undecided |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
I've tested the above bug in Safari and FireFox (latest builds) and it would appear that a few things are going on here:
Rather than checking the length of the input field itself, you want to be checking the length of $('#test').val().length instead.
This will give you a value of over 2000 rather than the value of 1 you were previously getting.
Closing as this works for me. I think it was just a case of the original submission testing for attribute lengths in the wrong way.