I have a js file which needs some html div content. where exactly I have to add div tags content in aspx page in SP designer 2010 .
Thank you.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI have a js file which needs some html div content. where exactly I have to add div tags content in aspx page in SP designer 2010 .
Thank you.
Create a new display form for the list and set it as default.
Then in this new display form, Search for <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
and paste your div below that tag.
Your question doesn't specify what's the purpose of the div, anyhow, being javascript, the div doesn't really need to exist beforehand. You can first inject it into the body, then call the function that needs it.
With jQuery it's something like:
$('body').append($('<div id="myDiv">')).
yourFunction($('#myDiv'));
This saves you from having to unghost the display form page