In my java desktop application, I have开发者_如何学C a form that is submitted, and the target for form's response is an iframe within that browser.
I am using SWT browser component.
I want to access content in that iframe, to see if the submission was successful or not.
Is this doable? How do I access data in the child iframe?
Regards, Arvind.
It definitely possible.
You have to create your own JavaScript code, which will return true
or false
(depending on form submit). Then you can use Browser
widget evaluate()
method (see javadocs) and as argument put name of your JavaScript method. As return value you'll get Boolean
with the result of your JavaScript method.
精彩评论