473,395 Members | 1,556 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Open a file in harddisk on loading a page

1
How to I open a .chm file stored in hard disk automatically on loading a web page using java script. Please help.
Thanks..
Aug 20 '07 #1
4 2309
epots9
1,351 Expert 1GB
javascript can not open files on from a client's harddrive.
Aug 20 '07 #2
pbmods
5,821 Expert 4TB
Heya, sv5467.

The best you could do, if you knew exactly where the file was stored on the User's hard drive:

Expand|Select|Wrap|Line Numbers
  1. window.location.href = 'file://C:\\path\\to\\file.chm';
  2.  
You might be able to use an ActiveX control to search for and/or open the file, but that would lock you into requiring that your Users use your app with Internet Explorer.
Aug 20 '07 #3
epots9
1,351 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. window.location.href = 'file://C:\\path\\to\\file.chm';
  2.  
for security issues, would any browser allow that? i know that works when the webpage is ran locally but i think it is bloced from the request is coming from a outside machine.
Aug 20 '07 #4
pbmods
5,821 Expert 4TB
for security issues, would any browser allow that? i know that works when the webpage is ran locally but i think it is bloced from the request is coming from a outside machine.
Is it? Good for them.

sv5467, looks like the best you can do is to create an anchor....
Expand|Select|Wrap|Line Numbers
  1. <a href="file://C:\path\to\file.chm"> ... </a>
  2.  
Aug 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page...
2
by: Richard Bell | last post by:
Newbie question ... please respond to group I'm trying to open/navigate to a url. How can I tell when the page is fully loaded? Testing suggest that window.open returns before the page is...
2
by: Georg Andersson | last post by:
hi i've created a html-file containing a frameset. the document in one frame enables the user to change the content of the other frames. but i want to modify the current html-files in the frame...
7
by: Merlin | last post by:
Hi there, I have a problem with opening new windows with JS. If the webpage did not complete loading due to any reason a click on a link which is supposed to open a small new other window loads...
4
by: Bob Bedford | last post by:
Hi all, I'm stuck with some php code that runs out of time limit. This is due to a long XML file process that has to save pictures on the disk. What I've now: - read XML file - parse XML...
28
by: n00m | last post by:
Both codes below read the same huge(~35MB) text file. In the file 1000000 lines, the length of each line < 99 chars. Stable result: Python runs ~0.65s C : ~0.70s Any thoughts?
2
by: LayneMitch via WebmasterKB.com | last post by:
Hello. I posted this earlier with the full code of the JavaScript file I'm trying to open. I'm posting this again, because the file is not the problem. I seem to be having a 'windows' problem...
3
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
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...
0
by: foltac | last post by:
We run a database replication process that ultimately puts a new copy of an Access DB in a new folder (on the server harddisk) every night. The folder is programmatically named and includes the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.