Yeah...would be nice if someone took something like that and converted it to
a plugin. Mario? YOu up for it?
 
:)

  _____  

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


Hi 

Wow. Looks great. 

ASAP I will study this

I saw that fileExtension is caseSensitive so probably should have 
fileExtension == "JPG" 
fileExtension == "jpg" 
fileExtension == "Jpg" 
to avoid trouble. 

thanks a lot Andy for share this

Regards

Mario




2007/8/17, Joan Piedra <  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]>:


Hello Andy,
It looks interesting, I've tried this before but I had some difficulties
with Firefox, at last I could do it with IE6, IE7, and Firefox. But Safari
and Opera mask the whole url in the input file. So this won't work in those
browsers. 

Regards, 




On 8/17/07, Andy Matthews <  <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED]> wrote: 

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/ 





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




-- 
Mário Alberto Chaves Moura
[EMAIL PROTECTED]  <mailto:[EMAIL PROTECTED]> 
31-9157-6000 

Reply via email to