Bug 145165

Summary: HTTPRequest's onreadystatechange function not working with iframe
Product: [Applications] konqueror Reporter: Ojec Borec <ojo>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: adawit, lemma
Priority: NOR Keywords: testcase, triaged
Version: 3.5   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: testcase

Description Ojec Borec 2007-05-07 23:47:42 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 4.1.1 Gentoo 4.1.1-r3
OS:                Linux

Hi.

Here is my problem. I've got 3 files:
main.html
iframe.html
data.xml

main.html file contains iframe element. This frame is iframe.html and it calls window.parent.callHTTPRequest function (defined in main.html). This function sends request for data.xml (I can see it in apache log) and when it recieves response, it calls httpRequestResponse. At least, it should, but it never happens. It works only under this two circumstances:
1. When I call callHTTPRequest function in main.html (not in iframe)
2. Or if I use function() instead of new Function() for httpRequest.onreadystatechange (but I need new Function() in real application)

Can anyone tell my why it doesn't work?
Comment 1 Michael Leupold 2008-10-12 17:08:10 UTC
I can't reproduce this on trunk r870274.

I tested this using a testcase at http://test.confuego.org/145165.php which does basically the same you're doing.
Comment 2 Michael Leupold 2008-10-12 17:10:11 UTC
Created attachment 27831 [details]
testcase

The testcase in case my server goes down.
Comment 3 Dawit Alemayehu 2011-06-12 00:53:32 UTC
See previous comments