I am trying to change the action of a form after a post. With this:
$.post(url,data,function(result){
$( ".page-added" ).append(result);
$("#edit-form").attr("action", "/edit-settings/");
})
return false
});
The result contains the form which has a default action="".
After this jquery, the action does not change. Is there something I am doing wrong? I pulled the changed from this post
I also tried clearing the form first:
$("#edit-form").removeAttr("action").attr("action", "/edit-settings/");
The form returned from the result looks like this:
<div>
<form id="edit-form" method="post" action="">{% csrf_token %}
<fieldset></fieldset>
</form>
</div>