I want to do a non ajax submit the form using POST. It seems to want to use the ajax submit even though in the form element I use data-ajax="false"
Anyone see how I can get around the ajax submit ?
Just starting out in mobile so not sure what the problem isHTML Code:<!DOCTYPE html> <html> <head> * * <title>My Location</title> <meta name="viewport" content="width=device-width, initial-scale=1"> * * <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" /> * <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.min.js"></script> * * <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script> * * <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> * * <script type="text/javascript"> * * * * $(document).ready(function() { * * * * * * $('#findme').click(function() { * * * * * * * * if (navigator.geolocation) { * * * * * * * * * * navigator.geolocation.getCurrentPosition(success, error); * * * * * * * * } else { * * * * * * * * * * error('Geolocation not supported'); * * * * * * * * } * * * * * * }); * * * * }); * * * * * function success(position) { * * * * * var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); //var long = position.coords.longitude; //var lat = position.coords.latitude; $('#long').val(position.coords.longitude); $('#lat').val(position.coords.latitude); * * * * * var myOptions = { * * * * * * zoom: 15, * * * * * * center: latlng, * * * * * * mapTypeControl: false, * * * * * * navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}, * * * * * * mapTypeId: google.maps.MapTypeId.ROADMAP * * * * * }; * * * * * var mapcanvas = $('#mapcanvas'); * * * * * var map = new google.maps.Map(mapcanvas[0], myOptions); * * * * * var marker = new google.maps.Marker({ * * * * * * * position: latlng, * * * * * * * map: map, * * * * * * * title:"I am here!" * * * * * }); * * * * } * * * * * function error(msg) { * * * * * var errMsg = typeof msg == 'string' ? msg : "Geolocation failed"; * * * * * $('#msg').html(errMsg); * * * * } * * </script> </head> <body> <div data-role="page"> <div align="center"> Locator By DM </div> <div data-role="content" data-theme="c"> <input id="findme" type="button" value="Find Me" /> * * * * * * <div id="msg"></div> <div id="mapcanvas" style="height: 200px; width: 260px;"></div> <form action="postdata.php" method="POST" data-ajax="false" target="_blank"> <div data-role="fieldcontain"> Type: <select name="damage_type"> <option name="pole">Pole</option> <option name="pedestal">Pedestal</option> <option name="barrier">Barrier</option> </select><br> Summary<br> <textarea name="summary"></textarea> <input type="hidden" name="long" id="long" value="" /> <input type="hidden" name="lat" id="lat" value="" /> <button type="submit" >Submit</button> </div> </form> </div> </div> </body> </html>
You can see it here. http://m.tripleipr.com/index.php



Reply With Quote
Bookmarks