That's not true at all. I've got a JS file that allows for live previews.
The JS file is attached, and here's the code needed to trigger it:
 
<form name="myForm">
    <input type="file" name="photo_file"><br>
    <input type="button" name="button" class="smaller" value="Preview Image"
onclick="previewImage(document.myForm.photo_file.value)">
</form>
 
I can't say that it works on all computers, but I've never once had a client
say that it didn't work.

  _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Joan Piedra
Sent: Friday, August 17, 2007 12:39 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Jquery can show Images from file:///C:?


Hey Mario,
I had the same idea some time ago, but after trying some workarounds and
reading a lot of browser docs I noticed this was an horrible and really bad
practice in web development.

So we actually can't make an "image preview" before sending data to the
server. 
We will have to stick to the simple way, upload then preview.

Cheers,



On 8/7/07, Mario Moura <  <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED]> wrote: 

Hi folks

What I am trying is show an image into my browser with this tag 

<img width="50" height="50" src="file:///C:/Users/example.JPG"/> into my
browser.

Is it possible? or is a security lock from browsers? 

I am using $.post()

So I could send the path that user choice C:/Users/example.JPG to my php and
return <img width="50" height="50" src="file:///C:/Users/example.JPG"/>

But isnt working because browsers cant show this tag <img width="50"
height="50" src="file:///C:/Users/example.JPG"/>

I can upload the file to webserver I know but will be more fast and I can
save some bandwidth traffic if I could do this. And avoid malicious users
consume my bandwidth traffic. 

So I am trying use AJAX to simulate Upload Ajax? and when forms is already
send images normaly (without ajax).

So Jquery can show Images from file:///C:? or something like this?

Regards

Mario 




-- 
Joan Piedra || Frontend webdeveloper
http://joanpiedra.com/ 

Attachment: previewImage.js
Description: application/js

Reply via email to