I have a button like that :
<a href="@Url.Action("Create", "City")" class="save button"><span class="icon-save"></span>Save</a>
Than I have:
$('.save').submitform();
$('form').ajaxForm({
target: ".module",
success: function (data) {
if (data == "Success") window.History.pushState(null, null, url);
}
});
And my Create :
[HttpPost]
public ActionResult Create(CityVM cityVM)
{
....
return Content("Success");
}
Ok, all works fine, but doing that way, I got the string “Success” printed on page before pushState executed…
How I can Avoid that? Maybe Am I missing something?
Thanks
Instead of:
You probably meant: