Skip to main content

Bug Tracker

Side navigation

#877 closed bug (fixed)

Opened January 24, 2007 02:00PM UTC

Closed July 25, 2007 12:57AM UTC

Last modified July 25, 2007 12:58AM UTC

$("#id", context) in another document misses id

Reported by: Dave Owned by: john
Priority: major Milestone: 1.1.4
Component: core Version: 1.1.3
Keywords: Cc:
Blocked by: Blocking:
Description

I have a strange problem: I can't search an element in the parent.document by id:

This isn't working:

$('#bussyMessage',parent.document).size();

but if the element has a name it works:

$('div[@name="bussyMessage"]',parent.document).size();

And this works too:

parent.document.getElementById('bussyMessage');

Could this be a bug? Or am I doing something wrong?

michael

PS: using V 1.1.1, but I think it didn't work with older versions either...

Attachments (0)
Change History (7)

Changed January 31, 2007 09:41PM UTC by joern comment:1

description: From: Michael Fuerst\ Sent: Wednesday, January 24, 2007 5:51 AM\ To: discuss@jquery.com\ \ Subject: [jQuery] searching by id in a different content\ \ I have a strange problem: I can't search an element in the parent.document by id:\ \ This isn't working:\ \ $('#bussyMessage',parent.document).size();\ \ but if the element has a name it works:\ \ $('div[@name="bussyMessage"]',parent.document).size();\ \ And this works too:\ \ parent.document.getElementById('bussyMessage');\ \ Could this be a bug? Or am I doing something wrong?\ \ michael\ \ PS: using V 1.1.1, but I think it didn't work with older versions either...\ \ I have a strange problem: I can't search an element in the parent.document by id:\ \ This isn't working:\ {{{\ $('#bussyMessage',parent.document).size();\ }}}\ \ but if the element has a name it works:\ {{{\ $('div[@name="bussyMessage"]',parent.document).size();\ }}}\ \ And this works too:\ {{{\ parent.document.getElementById('bussyMessage');\ }}}\ Could this be a bug? Or am I doing something wrong?\ \ michael\ \ PS: using V 1.1.1, but I think it didn't work with older versions either...

Changed March 24, 2007 05:40PM UTC by john comment:2

need: → Test Case

Changed April 29, 2007 06:49PM UTC by john comment:3

milestone: → 1.1.3
version: → 1.1.1

Changed July 15, 2007 03:01PM UTC by john comment:4

description: I have a strange problem: I can't search an element in the parent.document by id:\ \ This isn't working:\ {{{\ $('#bussyMessage',parent.document).size();\ }}}\ \ but if the element has a name it works:\ {{{\ $('div[@name="bussyMessage"]',parent.document).size();\ }}}\ \ And this works too:\ {{{\ parent.document.getElementById('bussyMessage');\ }}}\ Could this be a bug? Or am I doing something wrong?\ \ michael\ \ PS: using V 1.1.1, but I think it didn't work with older versions either...I have a strange problem: I can't search an element in the parent.document by id: \ \ This isn't working: \ {{{ \ $('#bussyMessage',parent.document).size(); \ }}} \ \ but if the element has a name it works: \ {{{ \ $('div[@name="bussyMessage"]',parent.document).size(); \ }}} \ \ And this works too: \ {{{ \ parent.document.getElementById('bussyMessage'); \ }}} \ Could this be a bug? Or am I doing something wrong? \ \ michael \ \ PS: using V 1.1.1, but I think it didn't work with older versions either...
milestone: 1.1.31.1.4
version: 1.1.11.1.3

I can confirm that this still happens.

Changed July 25, 2007 12:43AM UTC by john comment:5

owner: → john

Changed July 25, 2007 12:57AM UTC by john comment:6

resolution: → fixed
status: newclosed

Changed July 25, 2007 12:58AM UTC by john comment:7

Fixed in SVN rev [2474].