Skip to main content

Bug Tracker

Side navigation

#1290 closed bug (worksforme)

Opened June 11, 2007 09:11AM UTC

Closed July 15, 2007 03:29PM UTC

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:
Blocked by: Blocking:
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

Attachments (0)
Change History (1)

Changed July 15, 2007 03:29PM UTC by john comment:1

milestone: 1.1.31.1.4
resolution: → worksforme
status: newclosed
version: 1.1.21.1.3

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