How to get url of List dialog box in SharePoint? It means that when we click on newform.aspx

How to detect that it is newform.aspx? enter image description here


According to my understanding,you want to check whether the URL is new form or not, You can check like this

if (window.location.href.toLowerCase().indexOf("newform.aspx") > 0)
  //Do your Operation

Include this code in your Custom webpart or script editor where to want to check.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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