1

I have a button on my webpage that runs some javascript code:

alert("Will refresh now");

window.location.reload(true);

It works in all the browsers we've tested it in.

But when I display that webpage inside my vb.net executable (in a WebBrowser control)... the "refresh" code is definitely run, but it just clears the screen.

Does anyone know why?

Community
  • 1
  • 1
Margie
  • 41
  • 4

1 Answers1

0

I just tried this very simple bit of HTML/Javascript and the page refreshes just fine for me.

<html>
<head><title>Test</title></head>
<body>
<script type="text/javascript">var d = new Date(); document.write(d);</script>
<input type="button" onclick="window.location.reload();" value="Click"/>
</body>
</html>
Chris Haas
  • 53,986
  • 12
  • 141
  • 274
  • And you are displaying that webpage inside a WebBrowser control... inside a vb.exe executable, right? That works 100% when in an external browser... but (for me) just "clears the screen" when I try to view that exact same webpage... from inside a WebBrowser Control. I wonder why? – Margie Jun 10 '11 at 19:25