i want to add a javascript code , which i getting from the server to my view .
is this possible .
i am doing this
jQuery(".city").change(function(){ var address = jQuery('#business-address').val(); var city = jQuery('.city').val(); var state = jQuery('.state').val(); var country = jQuery('.country').val(); var address_string = address+","+city+","+state+","+country; jQuery.ajax({ type: "post", url: baseurl+"home/auth/create_google_map_from_address", data:{address:address_string}, success: function(data,status){ var data_array = JSON.parse(data); var latitude = data_array['map']['markers']['marker_0'].latitude; var longitude = data_array['map']['markers']['marker_0'].longitude; var map_js = data_array['map'].js; var map_html = data_array['map'].html; alert(latitude); jQuery('#gmap_js').html(map_js); } }); }); i am getting a javasript code to variable map_js
i want to add this code to the html page ,
currently i am using jQuery('#gmap_js').html(map_js);
but it is not working , how to do this .
this is map_js

please help...........