Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Download Binary data using javascript

Status
Not open for further replies.

rn123

Programmer
Oct 24, 2006
1
US
Hi,
Is there any way I can download image files using javascript?
I have a server app. that writes image bytes in a servlet. I have a client app. that understands only javascript and I need to download the file from the server app. to the client app.

can someone pls. help me? any ideas would be greatly appreciated.

thanks,
 
Can't you get your servlet app to serve the binary data via a dynamic URL instead?

While some browsers let you create images from binary data, IE does not, and given that it's got the biggest market share, not supporting it would be fruitless... so suggest the above method instead (this is commonly used for CAPTCHA images)

Hope this helps,
Dan

Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top