Created
November 15, 2016 00:38
-
-
Save aurorapar/b23ae1748ccb36052e05df6717d7d2e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = "http://localhost/lab8/php/driver.php"; | |
window.onload = init; | |
function init() | |
{ | |
$("#submitselect").click(submitQuery); | |
} | |
function submitQuery(event) | |
{ | |
var country = $('#countryselect').val(); | |
var city = $('#cityselect').val(); | |
var population = $('#popselect').val(); | |
var self = this; | |
$.ajax({ | |
type: "POST", | |
url: url, | |
data: "country="+country+"&city="+city+"&population="+population, | |
success: function(response) | |
{ | |
self.output = response; | |
} | |
}); | |
$("#result").text("before"); | |
alert(self.output); | |
$("#result").text(self.output); | |
alert("3"); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment