$ajax call from jquerymobile to jquery(html)
Hi
I have program made with Jquery mobile (and run perfect)
now i want to put the same on a website
so i have the html here it looks nice but the ajax call wiil not do his work..on my mobile the application works good
here is the code
(i have delete my key)
- <html>
- <head>
- <title></title>
- <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
- <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
- <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
- <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
- <script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
-
- <script type="text/javascript"></script>
- <script>
-
- function GetData(){
-
-
- x= '<center>Laden........</center>';
- document.getElementById("resultaat").innerHTML=x;
- if ($('#select-choice-min').val() === "food") {
-
- var XMLURI = 'https://maps.googleapis.com/maps/api/place/search/xml?location=51.723876,5.706579&radius=100&sensor=false&key=Mykey';
- }
-
- $.ajax({
- type:'GET',
- url: XMLURI,
- method: 'POST',
- success:succFunctie,
- error:errFunctie
-
- });
-
-
- }
- function errFunctie(err){
-
- alert(err.message);
- x= '<center>Laden mislukt</center>' + err.status;
- document.getElementById("resultaat").innerHTML=x;
- }
- function succFunctie(data){
- $pois = $(data).find('PlaceSearchResponse'),
- Name = $pois.find('result name')[i],
- Name = $(Name).text();
- x= Name;
- document.getElementById("resultaat").innerHTML=x;
- };
-
-
-
- </script>
-
-
- <style type="text/css">
- #mapCanvas {
- width: 300px;
- height: 300px;
- float: left;
- }
- #infoPanel {
- float: left;
- margin-left: 10px;
- }
- #infoPanel div {
- margin-bottom: 5px;
- }
- </style>
- </head>
- <body>
- <div data-role="instellingen" id ="instellingen">
-
- <label for="select-choice-min" class="select">Wat wil je beoordelen:</label>
- <select name="select-choice-min" id="select-choice-min" >
- <option value="food">restaurant</option>
- <option value="cafe">cafe</option>
- <option value="bar">bar</option>
- </select>
- <button id="#BtnVraag" onclick="GetData();"value="BtnVraag">Zoek in de buurt</div>
-
- </div>
- <p id="resultaat"></p>
- </div>
- </div>
- </body>
- </html>