开发者

how to parse content within an iframe of swt browser in java desktop app

开发者 https://www.devze.com 2023-03-30 22:43 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消