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 Children
  • Hi Mehul

    It would be better to create a plugin rather than customize the create.js.

    Inside a plugin you can attach events to components controller which implement such plugin.

    Then you can create a custom field type which implements that plugin and extends the regular base field.

    After that you just need to update your record.php in order to define the new field type for billing_address_xxx.

    This way the create and record views remain stable.

    Kind regards

    André Lopes
    Lampada Global
    Skype: andre.lampada