Bug Tracker

Opened 15 years ago

Closed 12 years ago

#2254 closed bug (worksforme)

problem with ajax url when calling top.function() from iframe

Reported by: kostas Owned by:
Priority: major Milestone: 1.2.1
Component: ajax Version: 1.2.1
Keywords: ajax url iframe top firefox Cc:
Blocked by: Blocking:



topUrl: http://domainA/a/ iframeUrl: http://domainA/a/b/

We have an iframe inside a page. we set an event to a button inside the iframe. ex. onmouseover: top.xFunction(); (to call a function on the top frame : top.xFunction() ).

the xFunction does an ajax request to the page: 'c.do?x=1'. but the url that $.ajax method prefills to the page is the url of the frame, not the url of the top. So instead of asking for: http://domainA/a/c.do?x=1 it asks for: http://domainA/a/b/c.do?x=1 which is wrong.

In explorer this bug is not present.

(further more in the xFunction we did window.alert(window.location) and brings back http://domainA/a/ (when called as top.xFunction) in both explorer and firefox. which is right.)


==TOP FRAME== functionX(){

var toolTip = $.ajax({ url: "c.do?x=1", async: false, cache: false


return toolTip;


====IFRAME=== the function is called by the iframe like this top.xFunction() which does not return a tooltip because the page that tries to access is the wrong one.

Attachments (1)

2254.zip (56.6 KB) - added by nathanhammond 15 years ago.
Test Case

Download all attachments as: .zip

Change History (2)

Changed 15 years ago by nathanhammond

Attachment: 2254.zip added

Test Case

comment:1 Changed 12 years ago by dmethvin

Resolution: worksforme
Status: newclosed

Tested and worked with Firefox 3.6, Opera 10.62, IE 8, Chrome 6.0.472, and Safari 5.0.1 Windows.

Note: See TracTickets for help on using tickets.