I have got a big trouble accessing frames of a webview in Javascript.
My webview loads a local HTML file that defines a frameset and
contains a Javascript that must be able to access various elements of
subframes.
For some strange reason normal access methods like
document.frameName.elementName etc. do not work and have never worked for me.
I found a workaround: in the script section of main frame I declared
variables like
var topicDoc;
var alertDoc;
var messageDoc;
in the HTML files representing content of respective frames I called
a JS function on load that set those variables like:
function onLoadingTopicFrame() {
parent.topicFrame = document;
}
This way I could access those frames in the main frame like:
topicDoc.elementName = somevalue;
It was a workaround but it worked. Not any more with OS 10.3.9. Now
these onLoad functions of subframes just are not able to access
parent frame - parent seems to be undefined.
Neither can I access the child frames in main frame using "ordinary"
techniques like
document.subFrameName.elementName.
It seem like if Apple has even further increased "security" of
communication between frames.
Has anybody met similar problems?
Regards,
Mihkel Tammepuu
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden