set javascaript variable in the php (php is in javascript) -


i write php code in side javascript.

this type:-

function load(){                 var lan= "22.3000";                 var lng= "70.7833";                 var radius = "7000";                 var xml;                 var data = lan+","+lng+","+radius;         xml = '<?php          echo file_get_contents("http://services.gisgraphy.com/geoloc/search?lat=23.00&lng=72.00&radius10000");?>'                 xmldoc = $.parsexml( xml );         $xml = $( xmldoc );            abc= xmldoc.getelementsbytagname("asciiname")[0].firstchild.nodevalue;         alert(abc);             } 


want set in php javascript variable value lan lng , radius when page load

what want load page ajax call load page lat , lng , radius parameters.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -