jquery - Cannot set focus on input field in infoWindow -


Why meditation is not kept in mind?

I am using Google Maps API V3.

$ ("#notitable") Focus () works fine when executed in firebug.

I call this function when clicking on the map:

  function setNinuneFovindo (lataling) {if (geocoder) {geocoder.geocode ({'latLng': latlng }, Function (result, status) {var address = ""; if (condition == google.maps.GeocoderStatus.OK) {if (result [1]) {address = result [1] .formatted_address;}} newNoteInfowindow = New google.maps.InfoWindow ({content: GetNoteForm (latlng, address) size: new google.maps.size (40,50)}; newNoteInfowindow.open (map, new notemark); google.maps.event.addListener ( NewNoteInfowindow, 'domready', function () {$ ("#notitle"). Focus ();}); google.maps.event.addListener (newNoteInfowindow, 'Closeclick', f Kshn () {newNoteMarker.setVisible (false);});}); }}  

It appears that before you add the event listener you open your Infobido Are there. So when you add the listener, the event has already been removed. Try returning the order of open () and adelistner ()

  google.maps.event.addListener (newNoteInfowindow, 'domready', function () {$ ("#nottitle") Focus ();}); NewNoteInfowindow.open (map, new notemark);  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -