Redirect from DispForm to EditForm
Domanda
I am trying to figure out how to redirect from DispForm to EditForm. I want to be able to click on a task and enter directly in Edit Mode.
I have this snippet and it should work but it doesn't:
<script type="text/javascript">
var ActualURL = window.location.href;
var SecondURL = ActualURL.replace(“DispForm.aspx”, “EditForm.aspx”);
window.location.replace(SecondURL);
</script>
What am I doing wrong?
Soluzione
It's work fine just replace “ & ” with " and It's work fine. Please make sure you put this code on display form.
<script type="text/javascript">
var ActualURL = window.location.href;
var SecondURL = ActualURL.replace("DispForm.aspx", "EditForm.aspx");
window.location.replace(SecondURL);
</script>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange