In this article we are able to see, how to add a custom
close button in SharePoint using JavaScript.
We are a requirement to add a custom close button on the
display from, once we clicked on the custom close button it should have to redirect
to different URL, in our case we given URL www.dotnetsharepoint.com
Copy this code in notepad save as txt format, add content editor in the
display form and refer the text file.
<style>
.ms-ButtonHeightWidth
/*-hiding Existing close button -*/
{
display:none;
}
</style>
<script type="text/javascript">
function closebutton()
{
window.location =
"www.dotnetsharepoint.com"
}
</script>
<html>
<body>
<table>
<tr>
<td>
<input type="button" value="Close"
width="150"
onclick="closebutton()" style =
"margin-left: 390px;">
</td>
</tr>
</table>
</body>
SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM