Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #33572

Getting local img to open window

Newsgroups comp.lang.javascript
From Andrew Poulos <ap_prog@hotmail.com>
Subject Getting local img to open window
Date 2017-07-04 11:26 +1000
Message-ID <iIGdnXI93plCc8fEnZ2dnUU7-UvNnZ2d@westnet.com.au> (permalink)

Show all headers | View raw


A user can design a question layout (for an elearning web page) and the 
layout can include an image - the user selects the image from their 
local file system. There's a 'preview' button which opens a new window 
showing the the user the layout.

I've started working with FileReader but I have some trouble getting 
things working. I need help with:

- How can I pass the reader result to the new window?

- How can the reader result be used as a CSS background image?
For an img I can do img.src = reader.result but for a background image 
is it just
div.style.backgroundImage = "url('" + reader.result + "')";
?


Andrew Poulos

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Getting local img to open window Andrew Poulos <ap_prog@hotmail.com> - 2017-07-04 11:26 +1000
  Re: Getting local img to open window Andrew Poulos <ap_prog@hotmail.com> - 2017-07-04 13:19 +1000
  Re: Getting local img to open window JJ <jj4public@vfemail.net> - 2017-07-04 10:21 +0700

csiph-web