Side navigation
#2254 closed bug (worksforme)
Opened January 30, 2008 11:20AM UTC
Closed September 28, 2010 11:41PM UTC
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: |
Description
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.
Attachments (1)
Change History (1)
Changed September 28, 2010 11:41PM UTC by comment:1
resolution: | → worksforme |
---|---|
status: | new → closed |
Tested and worked with Firefox 3.6, Opera 10.62, IE 8, Chrome 6.0.472, and Safari 5.0.1 Windows.