Visualizzazione dei risultati da 1 a 6 su 6
  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2012
    Messaggi
    154

    [JAVASCRIPT] Unexpected end of input

    Con questo codice la console javascript di google chrome da l'errore riportato nel titolo della discussione..


    codice:
    $(function() { 
    $("#city").blur(function() {
    check_city()}); 
    });
    
    
    function check_city()
    {
    
    var place =  $("#city").val();
    
    geocoder = new GClientGeocoder();
    geocoder.getLatLng(place, function(point) {
        if (!point) {
    		if(place =! "")
    		{
            alert(place + " not found. Retry!");
    		document.register.city.value = "";
    		$('#city').focus(); 
    		}
            } 
    	else {
    		//alert(point);
            //var info = place+"</h3>Latitude: "+point.y+"  Longitude:"+point.x;
    		var lat = point.y;
    		var long = point.x;
           // var marker = new GMarker(point);
           // map.addOverlay(marker);
           // marker.openInfoWindowHtml(info);
        }
    }
    Mess with the best die like the rest.

  2. #2
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    non chiudi una }

  3. #3
    Utente di HTML.it
    Registrato dal
    Jan 2012
    Messaggi
    154
    Chiudendola invece l'errore che da è questo: "Uncaught SyntaxError: Unexpected token }" Sull'ultima riga :/
    Mess with the best die like the rest.

  4. #4
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    eh, lascia un link dove vedere il tutto
    in quello che hai postato non chiudi una graffa, se c'e' altro non posso immaginarlo

    ciao

  5. #5
    Utente di HTML.it
    Registrato dal
    Jan 2012
    Messaggi
    154
    Ecco il link con tutto il codice!
    Mess with the best die like the rest.

  6. #6
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    non chiudi neanche la tonda alla fine di
    geocoder.getLatLng(place, function(point) {
    ...
    })

    ciao

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.