Loading...

ListView New Form Url parameter

ListView New Form Url parameter

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #4742
      Anonymous
      Anonymous
      Participant

      Hello,

      n

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

      n

      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.

      n

      ON Results Header

      n

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

      n

      function f1(){ var pid = getParameterByName(‘PID’); var url = “./ProjectPortalNewItem.aspx?PID=”; var url = url + pid; document.getElementById(“task”).href=url; }</script>

      n

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

      n

      ON Results Body

      n

      <body onLoad=”f1()”>

    • #7132
      Anonymous
      Anonymous
      Participant

      Hi there,

      n

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

      n

       

      n

      And what the SharePoint version you are using?

      n

       

      n

Viewing 1 reply thread

You must be logged in to reply to this topic.