Bug Tracker

Modify

Ticket #1290 (closed bug: worksforme)

Opened 6 years ago

Last modified 6 years ago

long id cannot be adressed via jquery

Reported by: fpauser Owned by:
Priority: major Milestone: 1.1.4
Component: core Version: 1.1.3
Keywords: id, selector Cc:
Blocking: Blocked by:

Description

hi,

i get this textarea:


<textarea name="record[_customer_Produkte][97678][Anwendungsgebiete][value]" id="record[_customer_Produkte][97678][Anwendungsgebiete][value]">bla bla</textarea>


trying to do: $('#record[_customer_Produkte][97678][Anwendungsgebiete][value]')

returns an empty array - document.getElementById('record[_customer_Produkte][97678][Anwendungsgebiete][value]') works! (ubuntu feisty, ff-2.0.0.4)

not tested in ie!

greets,

fpauser

Change History

comment:1 Changed 6 years ago by john

  • Status changed from new to closed
  • Version changed from 1.1.2 to 1.1.3
  • Resolution set to worksforme
  • Milestone changed from 1.1.3 to 1.1.4

In order to make that work you'll have to do:

  $('#record\\[_customer_Produkte\\]\\[97678\\]\\[Anwendungsgebiete\\]\\[value\\]')

Of course, at that point it's probably better to just generate a different ID.

More information can be found here:  http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_it.27s_ID.3F

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.