Re: How to open a file on the clients local hard drive from within by Evertjan
Evertjan
Sat Oct 13 02:56:54 PDT 2007
=?Utf-8?B?UGV0ZXI=?= wrote on 13 okt 2007 in
microsoft.public.inetserver.asp.general:
> "Evertjan." wrote:
>> > How do I achieve this?
>>
>> You don't.
>>
>> ASP runs ONLY on the server
>> and ONLY sends the computed html to the client.
>>
>> Clientside coding, in javascript,
>> [or if IE only, also in clientside vbscript]
>> could read from the client's hard disk
>> ONLY if the security of the browser is compromized.
>>
>> This however, besides being unwize,
>> is outside the scope of this ASP NG.
>>
>> You could say, as many have done before you,
>> and you could and should have read in the archive,
>> that your application is so important, that it
>> is justfied that asp programmers should help you to
>> make clientside script, that also is dangerous to the ordinary user
>> if it were even possible, but I would not agree with you there.
>>
>> So I would urge you not even to search for appropriate NG's,
>> but to abandon your quest.
>>
>> --
>> Evertjan.
[Please do not toppost on usenet]
> Thanks Jan for the answer.
[please do not invent another name for me]
> The goal was to build the drop down list with all 2800 Cities and
> their postcode in it so the user can select the city rather then
> typing it. Problem is that it takes a huge time to download this
> content from the server (SQL data) to the client.
I do not see why that would take a long time, only 2800 cities cum
postcode. A file of perhaps 100kB would do, methinks.
A nice jpeg is larger.
Do you dial in?
And it is not even necessary when using AJAX.
You would not have the user spit through a dropdown of 2800 lines?
Subidvided by the first two letters AJAX will only need to fetch between
5 to 20 records.
> It would goes faster
> if this data was locally stored since she would not change in the
> future. (unless the spilt of HBV will cause Flemish cities become
> Brussels cities, according to the current political crisis in Belgium)
Which will never happen, they will go over to the Netherlands first. ;-)
Explanation of the "why" does not help, if something is imposseble.
However nothing is really impossible, if you think of it:
The browser cache can be used freely, though inconsistently because of
the individual settings of the users and browser types.
Try putting all the data in one .js file as an array of arrays:
a = [
['Brussel','10000'],
['Dendermonde','12345']
];
That file need only be loaded once a day or so.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)