Opened 10 years ago

Closed 10 years ago

#4944 closed bug (notabug)

tabs load callback doesn't have reference to $() IE7

Reported by: thrykol Owned by:
Priority: minor Milestone: 1.8
Component: ui.tabs Version: 1.7.2
Keywords: add tabs load IE7 Cc:
Blocked by: Blocking:

Description

The following code fragment fails in IE7. The new tab appears to add correctly, but when I click on the tab, IE gives the error:

A Runtime Error has occurred
Line: 2
Error: Object expected

1 $("#tabs").tabs({
2   load : function() { alert($("#message").text()); }
3 });
4 
5 $("#tabs").add("add", "blank.html", "Test Tab", 1);

Attachments (1)

sample.zip (74.9 KB) - added by thrykol 10 years ago.
Zip file containing functional sample code.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by thrykol

Attachment: sample.zip added

Zip file containing functional sample code.

comment:1 Changed 10 years ago by Jörn Zaefferer

Milestone: TBD1.8

Does "blank.html" exist?

comment:2 Changed 10 years ago by thrykol

Yes it does. It should be in the zip file. It is essentially an empty html file containing a reference to the parent's jquery object. In my application, cross-site scripting is not an issue (hence the sharing of the object).

comment:3 Changed 10 years ago by Scott González

Resolution: invalid
Status: newclosed

You're loading a page from the same path, which means that it's from the same domain, so there is no cross-site scripting occurring. This isn't even cross-window scripting, which is what you're thinking of. There's absolutely no reason to do $ = parent.$ since the code is on the same page. I'm not even sure what you're trying to accomplish with this test case.

Note: See TracTickets for help on using tickets.