I have a button in my html form.When i enter values in the textfield
, a background operation is performed and data is sent to the server.But since this button already has an event (submit), how do i open a new page once that background operation is completed?
This is the button.
<a href="#" id="submit" data-role="button" data-inline="true"> Submit</a>
and in my javascript i have this function
$(document).ready( function() {
$("#submit").bind('click', function(event){
doSomeBackgroundStuff();
});
This is happening from Page A
, i want Page B
to open when doSomeBackgroundStuff()
finishes.