Bug Tracker

Ticket #877 (closed bug: fixed)

Opened 2 years ago

Last modified 2 months ago

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

Reported by: Dave Assigned to: john
Type: bug Priority: major
Milestone: 1.1.4 Component: core
Version: 1.1.3 Keywords:
Cc: Needs: Test Case

Description (last modified by john) (diff)

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

Change History

Changed 2 years ago by joern

  • description changed from 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... to 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 2 years ago by john

  • need set to Test Case

Changed 2 years ago by john

  • version set to 1.1.1
  • milestone set to 1.1.3

Changed 1 year ago by john

  • version changed from 1.1.1 to 1.1.3
  • description changed from 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... to 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 changed from 1.1.3 to 1.1.4

I can confirm that this still happens.

Changed 1 year ago by john

  • owner set to john

Changed 1 year ago by john

  • status changed from new to closed
  • resolution set to fixed

Changed 1 year ago by john

Fixed in SVN rev [2474].

Note: See TracTickets for help on using tickets.