Rails image preview across all browsers - javascript

Is it possible to preview image (on upload) before saving across all the browsers.
I have implemented this way for Firefox:
document.getElementById("preview-photo").src = what.files[0].getAsDataURL();
this works fine, and, for IE
document.getElementById("preview-photo").src = what.value;
this docent work and same case with other browsers like Chrome and Safari.
Currently I can see preview only in Firefox, other browsers not showing preview.
Please, advise me how to work on this.
Thanks

There's no completely cross-browser way to do this due to security settings in most browsers preventing file control access.
This may indicate a work-around for FF3, IE7, and a handful of other cases:
How to upload preview image before upload through JavaScript

Related

What is causing my images to not load initially in safari. All other browsers seem to work fine

I am currently using the 3d cardflip method on my website and it is working perfectly in Firefox, IE, as well as the IE downgrades I have for older browsers. My issue is arising from the fact that it seems that all Apple iOS devices and Safari will not load the images and information on the cards on the initial load of the page but only when a hard reload or a simple reload of the page is performed. I have tried everything I can think of to fix the issue and I have not been able to find any information regarding the issue either. Any help would be gladly appreciated! The page that is not working is http://www.paytonandsam.com/about_sam.html
Please test this website on Safari Version 5.1.5, 6.0.2,6.0.3 i.e. a higher version of Safari browser. Because now safari browser is faster and flexible than the older version.

How to Draw lines using wz_jsgraphics.js library in IE 7/8/9

I am using wz_jsgraphics.js library to draw lines. It is working with all browser other than IE 7/8/9. Now I want to run it on any IE7/8/9 browser. Please guide me to resolve this problem.
Walter Zorn's wz_jsgraphics.js works fine in IE7, IE8, and IE9 when I use these browsers on four different computers.
Internet Explorer has quite many options. Maybe one of them needs to be changed on your computer. For instance, if you are running jsgraphics offline from an html document on a file, the advanced IE option Allow Active Content To Run From A File (or whatever it is called) must, of course, be checked.

Javascript file upload hack, not working on all browsers

How can I improve the following so it works in multiple browsers?
$('#img').click(function() {
$('input[type=file]').click();
});
So when I click an image it will allow to select a file to upload. On the css I did the following:
input[type="file"]{display:none;}
Tried it on safari 5.1.2 & opera 11.61 and it did not work.... Test it on firefox and ie8 and it worked...
You can't do this with inputs type file in a x-browser compatible way.
Quirksmode, as always, has a lot to say about this topic:
http://www.quirksmode.org/dom/inputfile.html

Drag and drop upload plugin

I want to create a jquery drag and drop file upload plugin or use an existing one.
Unfortunately I cannot find any plugin that does exactly what I want to achieve.
Can someone point me a good place to search or how to start to implement my own file upload plugin?
Thanks.
I need the following functionality:
The one should work perfectly for your needs. I have used it and it is pretty simple to configure and use.
http://valums.com/ajax-upload/
Here are the features
multiple file select, progress-bar in FF, Chrome, Safari
drag-and-drop file select in FF, Chrome
uploads are cancellable
no external dependencies
doesn't use Flash
fully working with https
keyboard support in FF, Chrome, Safari
tested in IE7,8; Firefox 3,3.6,4; Safari4,5; Chrome; Opera10.60;
also, you can try PLUpload (http://plupload.com/)
On that page you'll see that Drag&Drop is supported by HTML5, Gears(from Google) or BrowserPlus.
Note: Drag/drop support of files is currently only available in Firefox and WebKit. Safari on Windows has some strange problems and requires workaround.
In IE and/or Opera, that drag&drop could not work properly as you expected.

SlideShare Does not Load on Internet Explorer 8

I have made a simple embed of slideshare on my site. However, on Internet Explorer, it keeps saying "Loading" and nothing appears. However, in Firefox its almost instant. Please try here using internet explorer.
Or is it just me? It makes use of Flash and Javascript.
What can the problem be?
Thanks all for any hellp
This page works fine in IE9 at least, and the content you say is broken was written in Flash. You might want to watch your HTTP traffic using Fiddler (www.fiddler2.com) and check for script errors using IE's developer tools (hit F12).
I've check it in Chrome, Firefox, IE6/7/8 and they all seem fine. I haven't checked it in Opera or Safari though.

Categories