1

I have an application in C# which uses a WebBrowser control.

On one page the user can click a button to process some information and navigate to a new page. The issue is that when the user clicks this button the WebBrowser just seems to stop.

I handle the Navigating, Navigated and DocumentCompleted events in my code and I see the Navigating event but then nothing else.

This is the HTML for the button being clicked:

<div class="right button-wrapper">
    <div class="clearfix right">
        <span id="nextbutton" 
              class="button-link button-link btn-reg btn-blue-reg">
            <span class="hasHover"><a id="btnPay" 
                href="javascript:void(0);" class="buttons">Next:Pay and Print</a>
            </span>
         </span>
    </div>
</div>

Buttons on other pages can be clicked with no issues.

I am assuming it has something to do with the href="javascript:void(0);" portion of the HTML but do not know why. In a browser such as IE or Firefox when this button is clicked something like a progress bar appears and say "Processing" for a few seconds and then the next page loads.

EDIT:I should mention that the Navigating handler fires twice and then the page freezes.

4
  • javascript:void(0) is telling your browser to do absolutely nothing when the link is clicked. There should probably be some JavaScript adding eventlisteners to that link. What does that JavaScript look like? Commented Apr 19, 2012 at 11:00
  • @atornblad, thanks for the response. I do not own the webpage so I don't know that I can get the JavaScript (unless it is embedded in the document?). I am able to view the source for the page and can provide that if it would help. Commented Apr 19, 2012 at 12:33
  • Have you tried Debuging JavaScript in a WebBrowser to see if you can see what, if anything, happens on the JavaScript side? Commented Apr 19, 2012 at 12:37
  • @atornblad, I believe this is the portion of the JavaScript where it stops loading: if(this.validate() === true){ self.modal.openOverlay(); self.modal.openOverlayProgress(); ce.checkoutForm.submit(); This is after some validation has taken place. Thanks. Commented Apr 19, 2012 at 13:52

1 Answer 1

2

This is apparently caused by IE7+'s "Script URL Mitigation" feature and can be fixed for your application by disabling FEATURE_SCRIPTURL_MITIGATION.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.