Hello everybody

I'am trying to execute JavaScript in GeckoWebBrowser
my code is :

Hide Copy Code

 GeckoWebBrowser1.Navigate("javascript:void(" + TextBox2.Text.Replace("""", """""") + ")")`

my JavaScript is :

Hide Copy Code

var r = confirm("Press a button");
if (r == true) {
    x = "You pressed OK!";
} else {
    x = "You pressed Cancel!";
}

but it's doing nothing
can you help me please , Thanks

I've asked that question on several forums but no one know the answer

swaer

Long ago I had this app in VB. I used Microsoft's own Webbroswer control (noted at http://www.vbforums.com/showthread.php?384076-Webbrowser-Control-Tip-and-Examples ) but since that was so long ago I can only guess why you went with Gecko here.

The app was done and has been out and on the shop floor for about a decade now. I can't guess if you did or did not try this with the stock control.

Hsn_1: one of the reasons that you might not get an appropriate answer, is because you are asking it in the wrong places.

You seem to be confusing between Java and JavaScript.
They're about as much alike as a Car and a Carpet.

When it comes to JavaScript, you may have more succes on the JavaScript forum.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.