ASP.net + jquerymobile + geolocation, using codebehind instead of ajax

Posted: February 7, 2012 in web
......
    $('#submitForm').click(function(e){
                    if($('#Form1').valid()){
                        if ($('#radiocurrent').is(':checked')) {
                           if(navigator.geolocation) {
                                navigator.geolocation.getCurrentPosition(function(position) {
                                    $('#lat').val(position.coords.latitude);
                                    $('#lng').val(position.coords.longitude);

                                    $.mobile.showPageLoadingMsg();
                                    sendingmessage();
                                    $('#Form1').submit(); //important
....
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s