Welcome Guest Search | Active Topics | Sign In | Register

EO.WebBrowser Reloads page on click of anchor tag Options
crenzi
Posted: Monday, January 12, 2015 1:04:56 PM
Rank: Member
Groups: Member

Joined: 11/13/2014
Posts: 13
We are using 2014.0.35 of the EO.WebBrowser. We have an html page that has an anchor reference, such as <a href=#test">test</a>, when you click on the link, it reloads the page. This issue causes us to lose any JS stored information from previous interactivity on the page. You can test by running the EO Tab sample with the html below. If you use a tool like Fiddler, you can see that it makes a request back out to the web server, rather than jumping directly to the anchor on the page. As a workaround, I tried looking at the LaunchUrl or UrlChanged events, but neither of this will provide a suitable solution.

<html>
<head>
<title>EO Browser Test</title>
</head>
<body>
<a href="#test">#Test</a>
<a href="#test2">#Test2</a>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<a name="test2"></a>
Test info
</body>
</html>
eo_support
Posted: Monday, January 12, 2015 4:12:58 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

We tested this and it seems to work fine. Our steps are:

1. Add a textbox at the bottom of your test file. For example:

Code: HTML/ASPX
....<br />
<input type="text" />
<a name="test2"></a>
</body>


2. Modify our TabbedBrowser sample, look for the following line inside MainWindow.xaml.cs:

item.Page.WebView.LaunchUrl += new LaunchUrlHandler(WebView_LaunchUrl);

Add code to handle BeforeRequestLoad after this line. Inside the newly generated event delete the default code that throws out an exception. Then set a break point here;

3. Run the sample, load the test HTML file. You will see the breakpoint set in step 2 hit. This means a new request was generated;

4. Type some text inside the text box;

5. Click the link;

On step 5 notes that:

1. The breakpoint is NOT hit. This means the page has not been reloaded;
2. The text in the text box did not change. This also means the page has not been reloaded;

Please try these steps and see if you get the same result.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.