how to include web js file and apply jquery

Hi folks

i have developed script for google maps address

I have load js files like

<script src="http://maps.googleapis.com/maps/api/js?key=#@#$$$#&sensor=false&libraries=places"></script>

and fire jqyery on input element like address

<input type="text" name="address"  style="width: 500px;"></input>

var autocomplete = new google.maps.places.Autocomplete($("input[name=address]")[0], {});

How can i load this js on Account Module .. How Can i apply jquery this on  $("input[name=billing_address_street]")

I have put all js file content in JsGrouping But  not work ...

How Can i do ???

Tevfik Tümer Angel Magana Ramana Raju Santhana

Parents Reply
  • Hi Ramana Raju Santhana

    Uncaught SyntaxError: Unexpected token :

    ({
         extendsFrom: 'CreateView',
        initialize: function(options) {
            this._super('initialize', [options]);
           
           events: {
           'keyup input[name="billing_address_city"] ': 'Getmap'  
            }
           
        },
        Getmap: function(){
    
    
                var pacLocation = this.model.get('billing_address_city');
                var autocomplete = new google.maps.places.Autocomplete(pacLocation,{});   
                 console.log("000001111111");  
                google.maps.event.addListener(autocomplete, 'place_changed', function() {
                    console.log("00000");  
                   var place = autocomplete.getPlace();
    
    
                    console.log(place.address_components);
           });
    
    
         },    
    })
    
    
    
    
Children