Hi!
Yesterday i was adding a new script file into a NewForm.aspx file.
I had a problem with this because when i added the <script> tag with the file reference src=”” it doesn’t works.
I found that i have to put that in a content but i want to do it adding the tag in the NewForm.aspx. Can i do it?
I don’t want do it writting the JavaScript code into NewForm.aspx, want to add the Scrpt REFERENCE.
Can you tell me about this?
There is nothing wrong with modifying the master page as long as you are careful. What I usually do is this:
- Create a copy of the masterpage
- Modify it as I need
- From Designer: Right click and set it as the Custom Master Page and also select it as the default master page.
This way if something goes wrong, you still have your default master page un-modified that you can very easily go back to by repeating the steps above. Unfortunately I don’t know of any other way to inject JS files into SharePoint without creating custom solutions or adding Content Editor Web parts to EVERY page that you want it to occur.