Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7489023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:11:24+00:00 2026-05-29T15:11:24+00:00

i had some trouvle with invoking a javascript function with more than one argument

  • 0

i had some trouvle with invoking a javascript function with more than one argument from a html page that is what i am doing :

wbNavigator.Navigate(new Uri("http://localhost:56433/route.html" ,UriKind.Absolute) );
object results= wbNavigator.InvokeScript("calculer", new string[] {"3.072526", "36.766942", "3.042526", "36.766942"});

but when invoking nothing’s hapening .Am i missing something ?
that is my javascript Code :

<script type="text/javascript">
       var directionsService = new google.maps.DirectionsService();
              var directionsDisplay = new google.maps.DirectionsRenderer();
              var myOptions = {
                  zoom: 7,
                  mapTypeId: google.maps.MapTypeId.ROADMAP
              }
       function calcluer(lon_A, lat_A, lon_B, lat_B) {
           var map = new google.maps.Map(document.getElementById("map"), myOptions);
           directionsDisplay.setMap(map);
           var salle2 = new google.maps.LatLng(lat_A, lon_A);
           var salle3 = new google.maps.LatLng(lat_B, lon_B);
           var request = {
               origin: salle2,
               destination: salle3,
               travelMode: google.maps.DirectionsTravelMode.DRIVING
           };  
       directionsService.route(request, function (response, status) {
           if (status == google.maps.DirectionsStatus.OK) {
               // Display the distance:
               document.getElementById('distance').innerHTML +=
                response.routes[0].legs[0].distance.value + " meters";
               // Display the duration:
               document.getElementById('duration').innerHTML +=
                response.routes[0].legs[0].duration.value + " seconds";
               directionsDisplay.setDirections(response);
           }
       });
       }
       </script> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T15:11:24+00:00Added an answer on May 29, 2026 at 3:11 pm

    Just use:-

    object results= wbNavigator.InvokeScript("calculer", "3.072526", "36.766942", "3.042526", "36.766942");
    

    Note that doing this immediately after navigate may not have the desired effect. You should perhaps move this code to the LoadCompleted event of the WebBrowser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've had some trouble forking of processes from a Perl CGI script when running
I use DropBox and I've had some trouble reaching to my files from other
I had some site templates designed for me recently. I got the final HTML
I had some code that ran commands through Runtime.getRuntime.exec(String) , and it worked on
I had some decryption code (using wincrypt.h ) that lived within my FileReader.cpp class.
I know that people have had some trouble with undefined CssClass values when using
Hi i am having some trouble passing variables/doing functions from other classes, Right now
i had some trouble generating WPF styles containing Triggers from C# code. Here's the
It seems that eclipse has always had some flaky auto-complete functionality. I'm now using
I've recently had some trouble moving the location of the indexes folder (for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.