I am following this walkthrough to create a training registration solution in SharePoint 2010. I have read through all of the comments and suggestions and tried everything to get this to work properly! There is a calculated column with the following:
=IF(Closed=TRUE,"Closed for registration",IF(RemainingSeats>0,"<a href='#'
onclick='OpenLandLRegistration("&StaticID&")'>Register</a>","Class is Full"))
This works perfectly fine, except that in IE it doesn't create a url it just displays <a href='#' onclick='OpenLandLRegistration(9)'>Register</a>
. The javascript that it is calling is:
<script type="text/javascript" src="http://(mysitenameiseditedout)/Training%20Center/SiteAssets/jquery-2.2.2.min.js"></script>
<script type="text/javascript">//Creates window and opens the infopath form
function OpenLandLRegistration(training_id){
var options = {
url:"/Lists/Attendees/Item/newifs.aspx?List=eab8c21a%2Da43f%2D41fa%2D9c82%2D65099e7855de&training_id=" + training_id,
width: 750,
height: 600,
dialogReturnValueCallback: DialogCallback,
dialogReturnValueCallback: RefreshOnDialogClose
};
SP.UI.ModalDialog.showModalDialog(options);
}
function DialogCallback(dialogResult, returnValue){ }// Reformat the url in the calculated column to hyperlink
$(function(){
// Format link font size and weight
$('td.ms-formlabel:contains("Register")').siblings(".ms-formbody").css("font-size", "18px");
$('td.ms-formlabel:contains("Register")').siblings(".ms-formbody").css("font-weight", "bold");reformatCalculatedColumnUrl();function reformatCalculatedColumnUrl(){
$('td.ms-formlabel:contains("Register")').siblings(".ms-formbody").each(function(){
$(this).html($(this).text());
});
};
});// Hides Columns
$(function() {$("a[name$='StaticID']").closest("tr").hide();
$("a[name$='SeatsIncrement']").closest("tr").hide();});</script>
I have checked this in both Firefox and Microsoft Edge and the register link displays correctly. But our employees use IE, so I really need this to work there!
Any advice would be greatly appreciated!