Reputation: 1575
I have function addFeaturesToScene
which make a new URL using ajax.
After the function ends I need to go to the new site automatically
Here is code:
function addFeatureToScene(featureNid, sceneNid)
{
alert(featureNid + " -> " + sceneNid);
$.ajax({
type : 'GET',
url : '/copy-feature-and-add-it-to-scene/' + featureNid + '/' + sceneNid,
dataType : 'json',
async : false,
success : function(reply) {
//Code to open a page with a new url?
}
});
}
Upvotes: 0
Views: 837
Reputation: 39724
You can use window.location
window.location.href = 'http://example.org';
Upvotes: 2