0

I have a user that wants the page to automatically go to the display page of an item that he just created. I want to be able to do this using a Content Editor Webpart using JavaScript that is placed on the list display page.

if(url = newItemURL){
window.location = newItemDisplayURL;
}

The problem I'm having is getting the display url for the newly created item. I could use the ID, but with just JavaScript I'd have to count elements and it gets messy if the user deletes an item. JavaScript is preferred because of organizational limitations, though other languages can be considered.

1 Answer 1

1

This isn't possible in SharePoint 2007 as you'll have to get this after the item creation, meaning after a PostBack is triggered. This of course reloads the page, erasing any track of the "old" page session.

You'll have to create an evenreceiver which redirects the user when the item is created.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.