HEllo,
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.)
code:
==TOP FRAME==
functionX(){
var toolTip = $.ajax({
url: "c.do?x=1",
async: false,
cache: false
}).responseText;
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.