Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Please help me realize the browser.getCurrentHtmlSrc() method.
Please help me realize the browser.getCurrentHtmlSrc() method. [message #443042] Fri, 17 September 2004 09:49
Yi Huang is currently offline Yi HuangFriend
Messages: 10
Registered: July 2009
Junior Member
Hi,

Here is what I am trying to do to get the current html src.

1. When the LocationEvent.changing was fired also store the the PostData and
HtmlHeader from BeforeNavigate2 IE event parameter.
2. When user calling getCurrentHtmlSrc(), used the stored information to
fetch the page using URLConnection and return the content back.

This should work since it just like a F5 refresh for the current page but we
will get the page we want.

In Browser line 163 I 've modified the code:

OleListener listener = new OleListener() {
public void handleEvent(OleEvent event) {
switch (event.type) {
case BeforeNavigate2 : {
/**
* Here is the getHTMLSrc() related impl
*/

Variant flags = event.arguments[2];
Variant targetFrameName = event.arguments[3];
Variant postData = event.arguments[4];
Variant headers = event.arguments[5];

But the problem is event.arguments[2] event.arguments[3] event.arguments[4]
event.arguments[5] are not returned properly, their type is
VT_ERROR|VT_BYREF which means there are errors when invoking.

Indeed the postData never returned, even in a very simple post web page. And
headers was also not return properly.

I am confused. Where is the problem?

What do you think about my ideas. I really hope swt could has this new
feature with your help.

Regards
Yi
Previous Topic:SWT Implementation of a awt.Print.Book
Next Topic:importing and editing sourcecode
Goto Forum:
  


Current Time: Thu Apr 25 20:49:51 GMT 2024

Powered by FUDForum. Page generated in 0.02334 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top