SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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


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.