Link to home
Start Free TrialLog in
Avatar of Arachn1d
Arachn1d

asked on

Providing a desktop Icon

In IE (probly netscape, too), if you drag a link of any sort to the desktop, it creates a shortcut to the page the link was addressed to. I want to be able to specify the Icon that is used, and, ideally, the text of the link created. Another possibility is that if anyone can tell me how to detect a drag-drop of an Icon/File to a HTML page (java possibly), that would be just as good.
Avatar of tecbuilder
tecbuilder

You cannot specify what icon is used per icon.  You can only change the default icon and icons will be displayed as that icon.  You have to right click on the icon and select properties to change an individual icon.  The name of the icon is based on the page's title and URL.  For the most part you are at the mercy of the operating system.

To create an icon of a link to a web site for Netscape drag and drop the little icon to the left of the word "Location:".

If what the icon is associated with e.g. an html page, text file, etc. then the browser will automatically display it.

tec
Avatar of Arachn1d

ASKER

This is not what I was looking for - I wanted to be able to have an end user drag a link to their desktop and appear as an Icon of my choice. Thanks anyway.

Nick
Well I'm sorry it's not the answer you wanted, however what I posted is true and accurate.  There is no other answer.  You cannot control another person's computer the way that you want.

tec
Do you know that 100% sure? I am not neccessarialy controlling their computer, just setting properties for drag&drop from my site. My other question mentioned above, is does anyone know how to make a part of a web-page (perhaps some java/javascript/ActiveX) into a Drop target, so I can drop a file on to it and recieve the text.
Tecbuilder - I would appreciate that if you think there is no way to do this, you do not post an answer saying it cannot be done - I'm not assigning points to find out if it CAN be done, but how if it can.
First, yes I am 100% sure.  You are trying to control a user's computer.  What you are wanting to do is tell a user's computer, that regardless of how they have their icons setup for certain file types, you want the icon to be what you want.  Users browser and operating system will not allow this.  Therefore the answer to this part of your question is, it cannot be done.

Second, there is no javascript solution that will allow a user to drop a file onto your web page and have the contents of this file get extracted so that the user can read it within your web page, so that they can send it to you.  Therefore the answer to this part of your question, is it cannot be done via drag & drop.  The only thing you can do is have the user cut and paste the contents of their file into a form's text field on your web page and have the contents of the form sent to you.

Third, you ask a question to get a correct answer.  The correct answer isn't always what we want it to be.  Sometimes the correct answer is that what you want to do cannot be done.

Lastly, if you are looking for a Java or ActiveX solution, I would suggest posting your question in those topic areas.  That's where you will find experts concerning those topics.  As for an HTML and JavaScript solution, the answer is that you cannot use drag & drop for what you want.

tec
For what reason is my answer wrong?
Arachn1d,

Please post feebback regarding this experts answer. Experts can only give answers if they receive feedback.

Ian
Commuunity Support  @ Experts Exchange
I have not awarded points here because I feel that it is most likely possible to create a drag and drop target in either Javascript, Java, ActiveX or just plain HTML. (In fact, I'm pretty sure I've seen it done) The reason I originally posted here is because I was unsure about which area would be best - it could be applied to any of them. Therefore, I feel this to not be a satisfactory answer to my question, but more of a non-answer.
FACT: What you want to do with drag & drop to the desktop with HTML will not work due to reasons stated earlier.
FACT: What you want to do with drag & drop to the desktop with JavaScript will not work due to reasons stated earlier.
FACT: What you want to do with drag & drop to the desktop with Java will not work due to reasons stated earlier.
FACT: What you want to do with drag & drop to the desktop with ActiveX will not work due to reasons stated earlier.
Your only possibility is to get the source code for IE and Netscape make the necessary changes to the source code, recompile, and tell everyone to use your version.

FACT:  What you want to do with drag & drop to a web page with HTML will not work.  The browser will attempt to read and display the contents.
FACT:  What you want to do with drag & drop to a web page with JavaScript will not work.  JavaScript only reacts to actions taken within the web page, not the browser application.

I am not certain (as I said above) whether or not Java or ActiveX can get the text from a dropped file or not.  Your question would be best posed to them in the Java and ActiveX areas.

tec
Since I am now asking for info on how to get the text from a file dropped onto a Java applet or an ActiveX one, you do not have the answer to this question. Do you propose I accept your 'answer' and post another 100 points in each of the ActiveX and Java areas for the exact same question I am asking now? No. You do not provide a full answer that I am satisfied with.
I would like to quote tecbuilders question in the suggestions area, Q10033196 dated Thursday December 18, 1997.

"A short discussion occurred on a question where the answer was more or less, you can't do that.  The question was worth 150 points.  It seems pretty unfair that a person comes here to get what they feel is a difficult answer, giving lots of points for the answer, only to find out that it simply cannot be done.  My thought is that so long as the question has not received an answer the questioner may be allowed to reduce the the amount of points given to the question.  This way they don't lose a lot of points for an answer that says they cannot do what they ask."

Have you had a 180 degree turnabout, tecbuilder? You further go on to say that you do not feel that a "cant be done" answer is worth some points, but not a lot. I agree. So why are you suddenly of quite the opposite opinion?
ASKER CERTIFIED SOLUTION
Avatar of tecbuilder
tecbuilder

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I apologise for thesemi-flame war we were engaged in earlier, and now appreciate the extents you have gone to to verify the possibilities.

Arachnid
Ha! You were wrong!!! Check out http://www.vbaccellerator.com and look in your address bar (using IE) - it chooses the icon. This IS possible! (Now give me my points back :)