I have php page.
On that page, there is dropdown to select cities.These cities are appearing from databases.
Next to that drop down.i have button to add more cities.On click of that button,a pop up(colorbox) appears in which i have form to add new city.
Now what i want is that when i add city in that pop up,that city must also appear in that dropdown of cities after closing that pop up box.
i tried to use ajax and that ajax gives me response.
Whenever i add a new city.That city is added and i got that city and others in that response.
But i can't send that success data to other PHP page.
How can i do that?
This is the functions that sends request to other page and get all cities(already added city and recently added) But i can send that response to other page where i want to populate that cities dropdown with this ajax call response.
function executeQuery() {
$.ajax({
url: '<?php echo WEB_URL; ?>pages/reload_fields.php?chk=vessel',
success:function(result)
{
$("<?php echo WEB_URL; ?>pages/add_report_entry.php#refreshPG").html(result);
}
});
setTimeout(executeQuery, 5000); // you could choose not to continue on failure...
}