how to inject a jquery code to a HTML page dynamically
<p>i want to add a javascript code , which i getting from the server to my view .</p>

<p>is this possible .</p>

<p>i am doing this</p>

<pre><code>    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);

              } 
         });
    });
</code></pre>

<p>i am getting a javasript code to variable <code>map_js</code></p>

<p>i want to add this code to the html page , </p>

<p>currently i am using <code>jQuery('#gmap_js').html(map_js);</code></p>

<p>but it is not working , how to do this . </p>

<p>this is map_js</p>

<p><img src="http://i.stack.imgur.com/jH1T9.png" alt="enter image description here"></p>

<p>please help...........</p>
