Капец а я сообразил такое решение (:
Код:
function myOnLoad()
{
if (document.getElementById("notescontrol") != null)
{
if (document.getElementById("notescontrol").readyState != "complete")
{
setTimeout('myOnLoad()', 1000);
return;
}
}
else
{
setTimeout('myOnLoad()', 1000);
return;
}
var myFile = $('#notescontrol').contents().find('span[WRPCTokenUrl]');
$('#notescontrol').contents().find('span[WRPCTokenUrl]').each(function(){
var url = $(this).attr("url") + '?AttachmentType=' + $(this).attr("attachmentType") + '&AttachmentId=' + $(this).attr("attachmentId") + '&IsNotesTabAttachment=' + $(this).attr("IsNotesTabAttachment") + $(this).attr("WRPCTokenUrl");
var html = ' (<a href="'+url+'" target="_blank" style="font-weight: bold; color:red;">Открыть</a>)';
$(this).after(html);
});
}