Показать сообщение отдельно
Старый 31.01.2012, 16:48   #7  
spectr is offline
spectr
Участник
Аватар для spectr
MCBMSS
Лучший по профессии 2014
 
287 / 70 (3) ++++
Регистрация: 19.10.2011
Адрес: Киев
Капец а я сообразил такое решение (:

Код:
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);
      });
}