By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,251 Members | 2,727 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,251 IT Pros & Developers. It's quick & easy.

How to access and display the jpg file on the fly using js in clie

P: n/a
I have a asp.net app, in the page there is a scan activex which could scan
and save a jpg file in client harddisk.

How could we access and display this jpg file on the fly using js in the
client IE?

Thanks,
-Billy zhang
Aug 14 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Billy,

As for web page and javascript, it is not allowed to access client
computer's file system. Actually, both IE7 and firefox restrict local image
file viewing. So far based on my research, some workarounds availables are:

1. Upload image to server-side so that we can use script to
programmtically display an html <imgvia a server-side url

2. Integrate the image displaying functionality into the ActiveX control.
That means use ActiveX control to load local file image and display it.
Maybe you can add another ActiveX control on the page to do the work.

BTW, I found that silverlight 2 seems support local image loading.

#Loading Images from the Local File System in Silverlight 2.0
http://www.wintellect.com/cs/blogs/j.../loading-image
s-from-the-local-file-system-in-silverlight-2-0.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/en-us/subs...#notifications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>X-WBNR-Posting-Host: 207.46.192.207
From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <ht****@noemail.noemail>
Subject: How to access and display the jpg file on the fly using js in clie
Date: Wed, 13 Aug 2008 19:28:01 -0700
>
I have a asp.net app, in the page there is a scan activex which could scan
and save a jpg file in client harddisk.

How could we access and display this jpg file on the fly using js in the
client IE?

Thanks,
-Billy zhang
Aug 14 '08 #2

P: n/a
Do you know any lightweight ATL control which could display jpg?

"Steven Cheng [MSFT]" wrote:
Hi Billy,

As for web page and javascript, it is not allowed to access client
computer's file system. Actually, both IE7 and firefox restrict local image
file viewing. So far based on my research, some workarounds availables are:

1. Upload image to server-side so that we can use script to
programmtically display an html <imgvia a server-side url

2. Integrate the image displaying functionality into the ActiveX control.
That means use ActiveX control to load local file image and display it.
Maybe you can add another ActiveX control on the page to do the work.

BTW, I found that silverlight 2 seems support local image loading.

#Loading Images from the Local File System in Silverlight 2.0
http://www.wintellect.com/cs/blogs/j.../loading-image
s-from-the-local-file-system-in-silverlight-2-0.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/en-us/subs...#notifications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
X-WBNR-Posting-Host: 207.46.192.207
From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <ht****@noemail.noemail>
Subject: How to access and display the jpg file on the fly using js in clie
Date: Wed, 13 Aug 2008 19:28:01 -0700

I have a asp.net app, in the page there is a scan activex which could scan
and save a jpg file in client harddisk.

How could we access and display this jpg file on the fly using js in the
client IE?

Thanks,
-Billy zhang

Aug 14 '08 #3

P: n/a
Thanks for your reply billy,

As for image activex control, I'm not sure about those commercial ones. If
you want to build a simple one on the fly, you can refer to the following
examples on code project which maybe helpful:
http://www.codeproject.com/KB/openGL/ntgraph3d_atl.aspx

http://www.codeproject.com/KB/atl/hktbcatl1.aspx

https://secure.codeproject.com/KB/CO...fid=42134&df=9
0&mpp=25&noise=3&sort=Position&view=Quick&select=1 358489

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/en-us/subs...#notifications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <ht****@noemail.noemail>
References: <69**********************************@microsoft.co m>
<ka**************@TK2MSFTNGHUB02.phx.gbl>
>Subject: RE: How to access and display the jpg file on the fly using js in
Date: Wed, 13 Aug 2008 23:55:01 -0700
>
Do you know any lightweight ATL control which could display jpg?

"Steven Cheng [MSFT]" wrote:
>Hi Billy,

As for web page and javascript, it is not allowed to access client
computer's file system. Actually, both IE7 and firefox restrict local
image
>file viewing. So far based on my research, some workarounds availables
are:
>>
1. Upload image to server-side so that we can use script to
programmtically display an html <imgvia a server-side url

2. Integrate the image displaying functionality into the ActiveX
control.
>That means use ActiveX control to load local file image and display it.
Maybe you can add another ActiveX control on the page to do the work.

BTW, I found that silverlight 2 seems support local image loading.

#Loading Images from the Local File System in Silverlight 2.0
http://www.wintellect.com/cs/blogs/j.../loading-image
>s-from-the-local-file-system-in-silverlight-2-0.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
>suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my
manager
>at: ms****@microsoft.com.

================================================= =
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/en-us/subs...#notifications.
>>
================================================= =
This posting is provided "AS IS" with no warranties, and confers no
rights.
>>
--------------------
>X-WBNR-Posting-Host: 207.46.192.207
From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <ht****@noemail.noemail>
Subject: How to access and display the jpg file on the fly using js in
clie
>Date: Wed, 13 Aug 2008 19:28:01 -0700
>
I have a asp.net app, in the page there is a scan activex which could
scan
>and save a jpg file in client harddisk.

How could we access and display this jpg file on the fly using js in
the
>client IE?

Thanks,
-Billy zhang

Aug 15 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.