Navigate or redirect NewForm.aspx to another page (Sharepoint 2010)

Hi,
Here i'm going to explain how to redirect the page from newform.aspx to another page after clicking the cancel or save buttons.
 here i'm giving the small example:
create a application page and paste the below script in PlaceHolderMain for the test purpose


 <script type="text/javascript">
function openwindow() {
window.open("http://localhost:5010/Lists/TestList/NewForm.aspx?Source=/_layouts/ModelDailogBoxSolution/Closepage.aspx", "mywindow", "menubar=1,resizable=1,width=350,height=250");
}
</script>

<a href="javascript: openwindow()">testing</a>
This is the test page, you can use this code according to your requirement 

Comments

Popular posts from this blog

javascript to get the all site user in sharepoint 2010 (Getting all Site users using Client Object Model)

SharePoint 2010: JavaScript Code To Check if user exists in a group (ECMA)

Disable all day event, Recurrence,Workspace Fields in Calendar list