It seems that javascript can only change the "location" property of an iframe if that iframe is empty or contains an html document. If the iframe contains a jpg, gif, pdf file etc, "location" cannot be changed at all.
Created attachment 6909 [details] Bug demonstration (open index.html in Safari)
Created attachment 6920 [details] additional test case Similar tests with data: URLs, self-contained. I'm not sure if this obsoletes the original test case, probably not.
Have seen the same, works on Safari Beta 3.02 but no longer with webkit at all here is a test: http://www.smilecms.com/webkit/iframe.html Simple javascript function that uses location.replace()
(In reply to comment #3) > Have seen the same, works on Safari Beta 3.02 but no longer with webkit at all > here is a test: > http://www.smilecms.com/webkit/iframe.html > > Simple javascript function that uses location.replace() The iframe.document property is no longer supported; please use iframe.contentDocument instead. This example produces a JavaScript error when the link is clicked in the test: TypeError: Undefined value http://www.smilecms.com/webkit/iframe.html Line: 32
This has been fixed for a while - I can no longer reproduce this problem with Safari 3.1.2.