Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #25467
| From | danca <cyberdanny@tiscalinet.it> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Images and pdf in a div |
| Date | 2014-07-19 00:31 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <lqc77u$ljp$1@dont-email.me> (permalink) |
Hi all, I have a page with thumbnails. When the user clicks on a thumbnail a script does the following: - creates a div - populates the div with some buttons (next,previous, close, change resolution...) -creates a image node, sets src to the big image the thumbnail correspond to, ad inserts it in the div - finally appends the div to document. So far, so good. 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). Thanks Dan
Back to comp.lang.javascript | Previous | Next — 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