Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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