Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

Solved LoadFromFile not working

Posted on 2006-12-02
Medium Priority
Last Modified: 2008-01-09
I am trying to execute following javascript on my button's OnClientClick event, but the code in line 4 doesn't execute.
Could someone help me to find out where the problem is.

function upload2()
    var BinaryStream = new ActiveXObject("ADODB.Stream") //line 1
    BinaryStream.Type = 1;                                                 //line 2
    BinaryStream.Open();                                                    //line 3
    BinaryStream.LoadFromFile("d:\\temp\namrata.jpg");      //line 4
    var what = BinaryStream.Read();                                    //line 5
Question by:param4r
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
  • 2
LVL 17

Expert Comment

ID: 18059137
Add one more "\" here


Author Comment

ID: 18059182
I am sorry but actual code does contains two slashes e.g.

but did not work. Please help
LVL 51

Accepted Solution

ahoffmann earned 500 total points
ID: 18059473
does you browser policy (security settings) allow to read from local filesystem?

Author Comment

ID: 18059564
how to check that

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (, we'll extend the program by adding a depth-…
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…

688 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