Can anyone atleast tell me if this is an api problem or a javascript
problem?

koeste wrote:
> Hi,
> I have a problem with Gdirections in ie6, with the following code:
>
> function createRoute()
>               {
>
>                       directions.clear();
>                       var distance = null;
>
>                       GEvent.addListener( directions, "load", function() {
>                               togLay('routeplaner');
>                       });
>                       GEvent.addListener( directions, "error", function() {
>                               alert('Fant ikke stedet du vil reise fra. Det 
> kan v�re lurt � ta
> med poststed eller postnummer i s�ket for � f� et mer n�yaktig
> resultat.');
>                       });
>
>                       directions.load('from: 
> '+document.getElementById('startsted').value
> +', norway to: '+document.getElementById('routeGps').value,
> { getPolyline:true });
>               }
>
> It works perfectly in ie7/ff/chrome/safari.
>
> But if I ad an alert to the final line of the function, it also works
> as intended in ie6.
> It doesn't seem to run the function otherwise, and when I invoke the
> alert(); it looks like it sends the error to the listener two times,
> making the alert in that function pop up twice.
>
> This may be my lack of javascript knowledge.
>
> the link to the demo page: http://www.wuerth.no/?avd=1&sd=256
>
> To get the "result" do the following:
> 1. Click on any of the red logos on the map.
> 2. In the infoWindow click "Beregn rute".
> A white box will pop up in the upper left corner on the map.
> 3. Enter "1481" (without the ") and press "Beregn rute" in the box.
> (1481 is a postalcode in norway, and is only used as an example.
> entering gibberish will provoke the double error problem in ie6)
>
> This should calculate the route and display the polyline. But in ie 6
> nothing happens when I press the last "Beregn rute".
>
> I hope someone can see what I'm doing wrong here, cause I have tried
> various other forums, and no-one can give me an answer.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to