Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #38743
| Subject | Re: Embed hides on subsequent dynamic updating |
|---|---|
| Newsgroups | comp.lang.javascript |
| References | <pdWdnYuQibaM0aLCnZ2dnUU7-QPNnZ2d@westnet.com.au> |
| From | Andrew Poulos <ap_prog@hotmail.com> |
| Date | 2020-08-21 15:25 +1000 |
| Message-ID | <bNKdnWKLZbAgx6LCnZ2dnUU7-ePNnZ2d@westnet.com.au> (permalink) |
On 21/08/2020 2:22 pm, Andrew Poulos wrote:
> I have this html
>
> <embed id="pdf"
> src=""
> type="application/pdf"
> title=""
> style="position:... ; display: none; opacity: 0;">
>
> and this css
>
> #pdf {
> transition: opacity 2s ease;
> }
>
> Selecting button 'A' causes the html to be dynamically updated to
>
> <embed id="pdf"
> src="pdf/test.pdf#view=FitH"
> type="application/pdf"
> title="Test document"
> style="position:... ; display: block; opacity: 1;">
>
> and the PDF displays. On selecting button 'B', the html is reverted back
> to the original and the PDF "hides". So far so good.
>
> Now, selecting button 'A' a subsequent time causes the html to update
> correctly but the PDF doesn't display.
>
> In Chrome's DevTools, unchecking and then checking the element's style
> checkbox for display: block; causes the PDF to display.
>
> What's going on, and how can I get the PDF to display correctly every time?
I still don't know what's happening but I decided to wrap the EMBED in a
DIV, and to change the display and opacity on the DIV instead, and the
PDF can be hidden and revealed multiple times correctly.
Andrew Poulos
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Embed hides on subsequent dynamic updating Andrew Poulos <ap_prog@hotmail.com> - 2020-08-21 14:22 +1000
Re: Embed hides on subsequent dynamic updating Andrew Poulos <ap_prog@hotmail.com> - 2020-08-21 15:25 +1000
Re: Embed hides on subsequent dynamic updating Julio Di Egidio <julio@diegidio.name> - 2020-08-20 23:15 -0700
Re: Embed hides on subsequent dynamic updating Andrew Poulos <ap_prog@hotmail.com> - 2020-08-21 16:59 +1000
csiph-web