Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #25475
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Images and pdf in a div |
| Date | Sat, 19 Jul 2014 13:34:01 +0200 |
| Organization | solani.org |
| Lines | 28 |
| Message-ID | <lqdl2u$45o$1@solani.org> (permalink) |
| References | <lqc77u$ljp$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-15 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | solani.org 1405769630 4280 eJwFwYEBwCAIA7CXVi0g51QY/59gYtvhFXRz2tgUajX0qbpKzRN3D8mbrYWlo/kz0hqeDuQDOqERiA== (19 Jul 2014 11:33:50 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Sat, 19 Jul 2014 11:33:50 +0000 (UTC) |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
| X-User-ID | eJwNwgERwDAIA0BLg0HADg2pfwnb/ecLAyuQiLy/NYhmnBPpONa9WU5BG3g67nIGNfKlyj8j4hG7 |
| In-Reply-To | <lqc77u$ljp$1@dont-email.me> |
| Cancel-Lock | sha1:gGvjifmFgcIhf6qKKHURzhgA8Hc= |
| X-NNTP-Posting-Host | eJwNycERACEIA8CW5DCBlMOg9F+Ct9+F09ixCW4MRorzVchNCU1aeCkKl2d6mWvVJSN7/kPPAwhUEM4= |
| Xref | csiph.com comp.lang.javascript:25475 |
Show key headers only | View raw
danca wrote: > When the thumbnails points to a PDF, however, I have to change the div, > particularly I: > -create a new embed node > -use replaceChild to switch the node image with the newly created node > embed. > I could anyway go another route: > create the two nodes and simply give display:none to alternatively the > image and the embed node, without the use of replaceChild. > > Has someone an idea about cross-browsers issues with the first approach? > It works with all the (main, modern) browsers on a pc. Android browser > is OK too, but I'm unsure about iPads and iPhones (and I have no one to > test with). I don't see any problems regarding the replacement of the node (i.e. your first approach). However, the embed element surely requires a PDF reader/renderer to be available in the browser (e.g. the Adobe Acrobat plugin). If that is not available, the browser likely will render an empty space or maybe an error message. Perhaps it is reasonable to display a preview image instead of the PDF document. -- Christoph M. Becker
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Images and pdf in a div danca <cyberdanny@tiscalinet.it> - 2014-07-19 00:31 +0200
Re: Images and pdf in a div "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-07-19 13:34 +0200
Re: Images and pdf in a div danca <cyberdanny@tiscalinet.it> - 2014-07-19 15:34 +0200
Re: Images and pdf in a div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-19 15:51 +0200
Re: Images and pdf in a div danca <cyberdanny@tiscalinet.it> - 2014-07-19 18:30 +0200
Re: Images and pdf in a div Andrew Poulos <ap_prog@hotmail.com> - 2014-07-20 15:23 +1000
Re: Images and pdf in a div Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-07-20 12:42 +0200
Re: Images and pdf in a div danca <cyberdanny@tiscalinet.it> - 2014-07-20 20:07 +0200
Re: Images and pdf in a div Andrew Poulos <ap_prog@hotmail.com> - 2014-07-21 14:10 +1000
Re: Images and pdf in a div danca <cyberdanny@tiscalinet.it> - 2014-07-21 14:19 +0200
Re: Images and pdf in a div Andrew Poulos <ap_prog@hotmail.com> - 2014-07-21 08:14 +1000
Re: Images and pdf in a div Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-07-21 02:00 +0200
Re: Images and pdf in a div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-21 07:15 +0200
Re: Images and pdf in a div Osmo Saarikumpu <osmo@weppipakki.com> - 2014-07-24 18:26 +0300
Re: Images and pdf in a div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-24 17:48 +0200
Re: Images and pdf in a div Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-24 22:32 +0100
Re: Images and pdf in a div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-24 23:58 +0200
Re: Images and pdf in a div "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-07-24 18:40 +0200
Re: Images and pdf in a div Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-07-25 12:31 +0200
Re: Images and pdf in a div John Harris <niam@jghnorth.org.uk.invalid> - 2014-07-25 15:52 +0100
csiph-web