|
Hello everyone,
I need help to implement the following capability on a simple web site:
1. when the user clicks a link, a page is displayed that says "if your download does not start
automatically...etc" with a bunch of other HTML stuff.
2. the download is automatically initiated (the browser displays the save file dialog box) after
the above page displays.
3. the file has an .exe extension, and I want to minimize the various doom warnings that
different browsers, esp. IE generate.
4. Ideally this should be done using a generic method such as JS (not ASP/VB/.NET)
I am completely stumped by #2 and #3, because of my low web development experience (besides plain HTML).
The various PHP recipes I've found do not work. I cant even reverse-engineer it from other web sites!
I am sure all of you have seen this functionality, which may be easy for you. Please help... in return, I can answer complex C++ questions if anyone still uses that
Thanks!
Ted
|
|
|
|
|
1. OK, create a page.
2. Add this script
<script type="text/javascipt">
setTimeout("window.open('file locaiton','Download')",5000);
</script>
3. Not possible. Think about it, the warning are there for a reason why would they provide a method to override them by any ordinary person?
4. No idea waht you mean. Generic?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
signing the executable will offer some assurance to your users.
|
|
|
|
|
And how does this relate to the question that was asked.
Signing doesn't mean a thing, anyone can purchase a certificate, even hijack one.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You may know better, but doens't IE have an option to check for certificates on downloaded code. If a downloaded exe is not signed, doesn't IE present another warning dialog box? Isn't that want you wanted to reduce?
With regard to the ability to subvert security mechanisms, you raise a good point. There are probably a large number of other techniques you can use to minimize warning dialog boxes.
|
|
|
|
|
hb52134214 wrote: If a downloaded exe is not signed
That's the point, it could be signed and still be nefarious. Signing is no guarantee of validity or safety.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Create a php page (if you are using php or just modify the code to suit your language. The concepts are the same because we are dealing with HTTP so languages dosent matter).
Add this code...
http://vikku.info/codesnippets/php/force-download-authenticated-download/[^]
---
$filename = "anyfolder/anyfilename.ext";<br />
header("Cache-Control: no-store");<br />
header("Expires: 0");<br />
header("Content-Type: application/octet-stream");<br />
header("Content-disposition: attachment; filename=\""."anyname.ext."\"");<br />
header("Content-Transfer-Encoding: binary");<br />
header('Content-Length: '. filesize($filename));<br />
readfile($filename);
---
just give a link to this file...
the result is this page will not load instead the download dialog box is triggered and this is the one you were expecting...
so as the previous person has posted...
window.setTimeout("location to the file",3000) // after three seconds...
location to the file should be replaced like this
window.location = 'folder/filename.ext'
thats it... done.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
plz help i want to add an image in an empty box(rectangular space) when i click on it
|
|
|
|
|
Make a transparent gif the same size as the one you want to display and call if blank.gif. Then do this (assuming the real picture is real.gif).
<div style="border:1px solid black;"><img src="blank.gif" onclick="this.src='real.gif';">
</div>
|
|
|
|
|
I have created an XML web service in Visual Studio 2008. My solution consists of two projects, one is a simple web site and the other the .asmx project. (Microsoft self-paced training kit Exam 70-562 - Creating and consuming ASP.NET web services, Page 624)
The Reference.vb file containing the proxy class is not appearing, only the .disco, .discomap and .wsdl files appear. Yes, I have clicked 'show all files'.
Yes, I know I don't need to and should'nt modify this file in any way, but I need to know why it is not there? More errata perhaps from Microsoft. ??
Everytime I buy one of these books, my first task is to go through with a pencil having to check and correct all the errata!!
Can anyone help?
|
|
|
|
|
Does the webservice work, ie has it actually generated the proxy?
I've known for VS to silently fail when generating those files if there's an access issue. Usually, restarting VS with Administrator permissions sorts it, there should be more info in the Application Event Log.
|
|
|
|
|
I runs perfectly. The asmx code-behind accesses an .mdf table in the App_Data folder of the web service appliation, via a webmethod and displays it on a Gridview control on the .aspx page.
There are no errors and no warnings at all!
I am using the local ASP.NET development server built into VS2008.
Incidentally, where is the app event log ??
|
|
|
|
|
The Windows Application Event Log (Run->eventvwr->Windows Logs).
Can you see the files in Windows Explorer?
If so, try switching the toggling the 'View all Files' off and on again in the Solution Explorer.
Beyond that I'm stumped, sorry.
|
|
|
|
|
Does anyone have any recommendations for good books that explain how to develop commercial Websites? I mean books that explain how to develop Websites that know how to collect money from PayPal and credit cards for products sold.
|
|
|
|
|
This may be the thing[^]
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
I guess I didn't make myself clear enough. I'm not looking for a book on project management. I'm looking for a practical book that explains the technologies and prerequisites I will need to develop a Website that can bill customers on-line and collect their money.
|
|
|
|
|
|
I have certainly failed to find the books that you reference, so maybe, as you conjecture, I am just totally doomed to failure through utter incompetence. I certainly did not think of Googling for eCommerce, but I just did and found out it means shopping cart software. That's what I need, all right. But I'm not sure my ignorance of the right word to Google for means I'm a total dunce.
I admit that for the past 20 years, I've been in a kind of programming rut. But in the last 15 months, I have managed to scratch build a highly polished (and I think commercially viable) WPF application consisting of 90,000 lines of C#, so my brain isn't in total shambles quite yet. It's just that my entire PC programming career (which stretches back to 1989) has been devoted to desktop applications and my employers never gave me an opportunity to learn Web programming, so I just don't know the vocabulary. I never even thought of Googling for "eCommerce." But thanks for the suggestions, in spite of your -- oh, so unkind sarcasm. At least I hope it made you feel good to think how superior you are to someone you don't even know.
|
|
|
|
|
I just looked at my naive daughter's Website and she knows absolutely nothing about programming yet has a shopping cart up there that makes payments into PayPal. I find this extremely encouraging. I sort of heard that there are turnkey shopping carts that you can just drop into a Website, and I'll be that's exactly what she's done. If she can figure it out, I'll bet you a dollar that I can figure out how to do that. But I thought you needed an Internet Merchant Account in order to do that. Maybe only if you want to use things like Master Card and Visa.
Anyhow, in the last couple of months I've taught myself SQL Server and ADO.NET and they're probably like rocket science compared to dropping a shopping cart control into my Website. So in spite of Mark Nischalke's judgment that I'm too feeble-minded to do it, I'll just bet he's dead wrong in his opinion that I won't be able to successfully build an "eCommerce application," as he puts it.
To demonstrate even more of my ignorance, I'm not even sure what he means by an "eCommerce application." Does he merely mean a Website that can collect money? That's all I need! I've got the application itself that I want to sell. Sounds as if the shopping cart is actually one of the smaller pieces of the puzzle and that I already have everything else.
It's amazing how much you can learn by asking "dumb" questions on the Internet. All you have to do is be willing to take completely unwarranted insults.
|
|
|
|
|
Why don't you wander over to ...
(1) Microsoft and download their demo applications, and perhaps even their video tutorials.
(2) Paypal and look at their guidance pages for processing Paypal transactions.
They really are helpful and you can learn an awfully lot from them. You can't expect the CP members to "hold your hand" every step of the way.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Richard A. Abbott wrote: You can't expect the CP members to "hold your hand" every step of the way.
I didn't ask for that! All I asked for was book recommendations! I swear you guys are a bunch of babies looking to humiliate.
|
|
|
|
|
fjparisIII wrote: you guys are a bunch of babies looking to humiliate.
No, you've done that pretty well yourself.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Paypal is pretty straight forward. Just read their web pages. No humiliation was directed, directly or indirectly, at you.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
I don't know why it isn't apparent that my problem was SOLVED long ago on this thread. Can't people read my titles? I don't understand why additional replies keep coming and coming. I wish everyone would just get over it.
|
|
|
|
|
fjparisIII wrote: Does he merely mean a Website that can collect money? That's all I need!
Some webhosts offer those services out of the box. As for books, try this[^] one. Aight, the title ain't that great, but the contents of the series usually is.
I are Troll
|
|
|
|