Fire javascript/jquery in jQuery dialog after .load -


I have a jQuery dialog that I set in a jTemplate with a list of items:

  & lt; A href = "#" square = "view-map" id = "{$ T.Address.AddressCity.Lat} | {$ T.Address.AddressCity.Lon}" & gt; & Lt; IMG src = "/ image / pattern / short-map.png" width = "16" height = "16" alt = "see this address on map ..." title = "check this address on map ..." Gt; & Lt; / Img & gt; & Lt; / A & gt;   

jQuery:

  $ ('View-map'). Live ('click', function () {$ ('# map'). Data ('id', $ (this) .attr ('id')) .dialog ('open'); return;}); $ ('# Map'). Dialog ({autoOpen: incorrect, recombine: wrong, location: 'top', model: true, width: 650, open: function () {var location = $ (this) .data ('id'). '|'); $ (This) .load ('/ component / google / map.aspx? Lat =' + location [0] + 'and loan =' + location [1]);}, button: {'OK ': Function () {$ (this) .dialog (' close ');}}});   

When the page is loading map.aspx , I want to fire the following javascript (so I can get maps from Google): < / P>

  function initialize () {var myOptions = {zoom: 9, disableDefaultUI: true, center: new google.maps.LatLng (& lt;% = Lat%>, & lt;% = Lon%>), mapTypeId: Google.maps.MapTypeId.ROADMAP}; Var map = new google.maps.Map (document.getElementById ('x-map-placeholder'), myOptions); Document.getElementById ('X-Map-Loader'). Style.display = 'none'; } Loadscript () {warning ("I am away!"); Var script = document.createElement ('script'); Script.type = 'text / javascript'; Script.src = 'http://maps.googleapis.com/maps/api/js?sensor=false&callback=initialize'; Document.body.appendChild (script); } Function to layer (s) {return s. Loller Sees (); } Fixed Fixed (n) {Return n.toFixed (0); } Window.onload = loadScript; Obviously this is not and I understand how this is how the dialogue is called - I think there is no  window by calling a dialog.  ING and therefore will not fire  load script , but I'm not sure what to do to bring it to the fire ....  

Any help Can do?

Help is appreciated.

use

  $ (function () {function to fire} );    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -