angman Posted October 19, 2019 Share Posted October 19, 2019 Hi, I put this procedure TFStampeSLP.unpdfrmDocFrameLoaded(Sender: TObject); begin UniSession.AddJS(unpdfrmDoc.JSName + '.iframe.contentWindow.document.' + 'getElementById ("download").style.display = "none"'); UniSession.AddJS(unpdfrmDoc.JSName + '.iframe.contentWindow.document.' + 'getElementById ("secondaryDownload").style.display = "none"'); UniSession.AddJS(unpdfrmDoc.JSName + '.iframe.contentWindow.document.' + 'getElementById ("print").style.display = "none"'); UniSession.AddJS(unpdfrmDoc.JSName + '.iframe.contentWindow.document.' + 'getElementById ("secondaryPrint").style.display = "none"'); end; It is working, but when the application run, got this ajax error: O1C8.iframe.contentWindow.document.getElementById ("download").style.display = "none";O1C8.iframe.contentWindow.document.getElementById ("secondaryDownload").style.display = "none";O1C8.iframe.contentWindow.document.getElementById ("print").style.display = "none";O1C8.iframe.contentWindow.document.getElementById ("secondaryPrint").style.display = "none"; can you suggest a solution? Quote Link to comment Share on other sites More sharing options...
azago Posted October 20, 2019 Share Posted October 20, 2019 procedure TfDataEntry.unpdfrmDocLoaded(Sender: TObject); begin if unpdfrmDoc.PDFURL > '' then begin // download button UniSession.AddJS (unpdfrmDoc.JSName + '.iframe.contentWindow.document.' + 'getElementById ("download").style.display = "none"'); UniSession.AddJS (unpdfrmDoc.JSName + '.iframe.contentWindow.document.' + 'getElementById ("secondaryDownload").style.display = "none"'); end; end; Quote Link to comment Share on other sites More sharing options...
angman Posted October 20, 2019 Author Share Posted October 20, 2019 Hi, thank you very much. 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.