add message incase document link is not a valida link

This commit is contained in:
Peter Maquiran
2024-02-23 12:22:56 +01:00
parent dab4c6c3c2
commit d5a98ea601
@@ -76,15 +76,18 @@ export class ViewerAttachmentPage implements OnInit {
// Optionally, you can add new content or recreate the iframe
var newIframe = document.createElement('iframe');
if(linkRequest.value.includes("http")) {
newIframe.src = linkRequest.value;
newIframe.width = '100%'
newIframe.height = '100%'
this.iframeContainer.nativeElement.innerHTML = ""
this.iframeContainer
this.iframeContainer.nativeElement.appendChild(newIframe)
} else {
this.iframeContainer.nativeElement.innerHTML = "Sem documento"
}
this.iframeContainer.nativeElement.style.display = 'flex'
} else {
this.iframeContainer.nativeElement.style.display = 'none'