PDA

View Full Version : Clipboard/javascript one size fits all browsers?



vmars316
05-12-2010, 08:57 PM
Greetings;
1)
I am finding all kinds of conflicting info on javascript/clipboard
and all the other browsers.
Does clipboard set/get/delete work on all browsers?
If not, which ones doos and donts.
And of course I would like to find/develope a .js where 'one size fits all'.
2)
I am beginning to think that its a 'no go'.
I was hoping to monitor the clipboard
and start up a *.exe when a certain clipboard event occurs.
3)
If "2)" is a 'no go', can the cookie pile be monitored,
to trigger an *.exe when a certain NEWcookie event occurs?

Thanks...vmars316

jscheuer1
05-13-2010, 08:22 PM
You cannot trigger .exe on the user's machine without one or both of Java (not javascript) which works for all browsers, and/or Active X (IE only).

BUT, almost no one will allow you to do it. Even the most relaxed default security settings warn the user that an application or whatever on the page they are viewing wants to to take control of their computer or words to that effect. This will scare 99.99% of your users away.

If this is not what you have in mind, please be more specific.

Also, not everybody has a clipboard. That's Windows only.

vmars316
05-14-2010, 03:10 AM
You cannot trigger .exe on the user's machine without one or both of Java (not javascript) which works for all browsers, and/or Active X (IE only).

I have this one covered.
A small pgm that monitors the clipboard, then does stuff.
I know that is Basic, I can set up my own type of clipboard items.
Maybe a .js extension, or whatever.
Is js can I create my own clipboard type?


Also, not everybody has a clipboard. That's Windows only.

Yes, that's a good point.
In that case, can someone aim me at a js for set, read, update, delete cookies,
to study?
Thanks...vmars

jscheuer1
05-14-2010, 02:46 PM
I doubt that you have that covered. It may work locally if you've already given your browser permission to do that, and you have the pgm installed. But try it live with a browser with its default security settings intact and it will probably be a different story. Also, how do you plan on getting your users to install your pgm?

Another thing to consider is that the clipboard and its rough equivalent for other OS's on the user's computer is something they have a reasonable right to expect will not be taken over by a web page. They might have something of relative importance on it that they don't want to lose just because your page decides it wants to overwrite it.

Cookies are OK, but not even as reliable as javascript (either or both may be disabled by the user). Which brings up another consideration, if this is to be secure or mission critical in any way, neither the clipboard, javascript or cookies should be used.

But if you want cookies, look here:

http://www.quirksmode.org/js/cookies.html

as well as here:

http://www.dynamicdrive.com/forums/blog.php?b=32

vmars316
05-14-2010, 04:10 PM
Thanks for the CompactCookie code.
Its a bit confusing to me (newbie) because of the new format (set: function),
Rather than what i am used to (function SetCookie).
What are the advantages of writing it your (not newbie) way?
Thanks...vmars316