ListView New Form Url parameter - SharePoint Customization - SharePoint for All - Dell Community

ListView New Form Url parameter

ListView New Form Url parameter

This question is not answered


I am trying to include in the URL for the new for a QueryString value.

I got something with a link. This actually work, but when the NewForm is closed drove me to the List instead of the previous page.

ON Results Header

<script type="text/javascript">
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(;
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));

function f1(){
var pid = getParameterByName('PID');
var url = "./ProjectPortalNewItem.aspx?PID=";
var url = url + pid;

<a href="#" id="task">New Task</a>

ON Results Body

<body onLoad="f1()">

All Replies
  • Hi there,

    I don’t understand your scenario, could you please give me an example?


    And what the SharePoint version you are using?