I have created a new SP2010 aspx page for users to create a new request. When they have filled in the form they should be a redirect to a “thank you” page.
I did this via SPD2010, creating a new page with a datasource to the “new” functionality of the request list.
So I got into following troubles:
– Page was created in Site Pages
– When a request is filled in, the page reloads
– When you add a ?Source, it doesn’t get picked up
So, there is a generic FireServerEvent that handles the action on the buttons where you can do something with. I couldn’t get a window.location through though.
Then a coworker came with a solution: ‘__redirect=(yoursite)’
So the code on the button looks like:
<input type="button" value="Save" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={http://www.google.com}')}" />
There is also a way to do this in SharePoint Designer. When you click on the button, right click and choose form actions. There you can add actions to the button.
More info here
This is a really good read for me. Must admit that you are one of the best bloggers I ever saw. Thanks for posting this useful article.
Thank You!
Thank You!