mazluta Posted August 3, 2021 Share Posted August 3, 2021 i tried procedure TViewerFrm.PDFViewFrameLoaded(Sender: TObject); begin // download button // UniSession.AddJS (PDFView.JSName + '.iframe.contentWindow.document.' // + 'getElementById ("download").style.display = "none"'); // UniSession.AddJS (PDFView.JSName + '.iframe.contentWindow.document.' // + 'getElementById ("secondaryDownload").style.display = "none"'); // open file button // UniSession.AddJS (PDFView.JSName + '.iframe.contentWindow.document.' // + 'getElementById ("openFile").style.display = "none"'); // UniSession.AddJS (PDFView.JSName + '.iframe.contentWindow.document.' // + 'getElementById ("secondaryOpenFile").style.display = "none"'); end; it's fail. so, i add some css to external css file =========== /* #ext-element-6 #download{ */ .toolbar #download{ display: none !important; } and i thought that the name of the form is ext-element-6 but didnt work. if i go to inspection-> elemnt.system and set ther display:none it work. so - how to i set the override to that elemnt.system thanks Quote Link to comment Share on other sites More sharing options...
mazluta Posted August 3, 2021 Author Share Posted August 3, 2021 more - can i set the form ID name? Quote Link to comment Share on other sites More sharing options...
mazluta Posted August 3, 2021 Author Share Posted August 3, 2021 if i tried to use UniSession.AddJS (PDFView.JSName + '.iframe.contentWindow.document.getElementById ("download").style.display = "none"'); i get Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 3, 2021 Share Posted August 3, 2021 40 minutes ago, mazluta said: UniSession.AddJS (PDFView.JSName + '.iframe.contentWindow.document.getElementById ("download").style.display = "none"'); Hello, Which build of UniGUI? Which browser are you using? Quote Link to comment Share on other sites More sharing options...
mazluta Posted August 4, 2021 Author Share Posted August 4, 2021 last version of uniGui chrom , safari Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 5, 2021 Share Posted August 5, 2021 5 hours ago, mazluta said: chrom Hello, Are you sure it doesn't work in chrome? Do you have a simple testcase to check? Quote Link to comment Share on other sites More sharing options...
mazluta Posted August 5, 2021 Author Share Posted August 5, 2021 Sherzod - have you check it Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 5, 2021 Share Posted August 5, 2021 23 minutes ago, mazluta said: have you check it Works for me (chrome) Quote Link to comment Share on other sites More sharing options...
mazluta Posted August 5, 2021 Author Share Posted August 5, 2021 good for u Quote Link to comment Share on other sites More sharing options...
mazluta Posted August 6, 2021 Author Share Posted August 6, 2021 ok. on form create the toolbar is not implemented yet, so that why it fail If PdfLoad Then // PdfLoad is true - after load the file to PdfURL begin UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.getElementById("download").style.display = "none"'); UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.getElementById("print").style.display = "none"'); UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.getElementById("openFile").style.display = "none"'); end; Quote Link to comment Share on other sites More sharing options...
mazluta Posted August 6, 2021 Author Share Posted August 6, 2021 so now - how can i check if there is titlebar in the frame? what the way to check the DOM or Document Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.