In my site I am trying to generate dynamic google map direction. The destination is dynamic. All I am doing is:
Here, {$map_code} is generated by me. This works fine. I am trying this above code to be appeared by jquery ajax within a div. where the locations are generated and also the script code. but problem is that, when ajax is writing the code within a div, the page is redirecting to a blank page and the google map direction is showing there(in the blank page).
I don't know why the page is redirecting.