Solved

Write binary data to file in javascript (like image file)

Posted on 2012-03-27
7
552 Views
Last Modified: 2012-08-13
Is there a way to write binary data to local disk files in javascript like image files?

I try it but it works only for txt files:

                                    var fp = fopen('image.jpg', 3);
                                    fwrite(fp, '<?php echo $contents; ?>')
                                    fclose(fp);

Thanks in advance
Zumba
0
Comment
Question by:ZumbaJr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
7 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 37771681
In short, you cannot save a file using javascript on client side.

You need to invoke server-side script to save this on server side.
0
 

Author Comment

by:ZumbaJr
ID: 37781233
I've requested that this question be deleted for the following reason:

It's wrong
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 37772282
Kindly explain the reason in detail, or I will have to object to your request.
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 37781234
saying "its wrong" and closing the question is not right. Please explain why are you closing the answer
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question