Page 1 of 1

strange idea?

Posted: Tue Jun 17, 2003 7:01 am
by pama
hi all,
i have got phonebook on my page (php,mysql) - it's works perfectly, but...
i wonder is it possible to create link in search results which could:
1) copy to clipboard a piece of search results (e.g. last part of telephone number)
2) then emulate ctrl+F10 shortcut (ANSII code???)
any ideas? :)

Posted: Tue Jun 17, 2003 8:09 am
by releasedj
Whether or not it is possible would be down to the browser, and nothing to do with PHP.

Kelvin

Posted: Tue Jun 17, 2003 8:31 am
by patrikG
You can only do it in IE, but "copying to clipboard" is actually a system-command. Thus, because IE is so tightly bundled with Windows, it can be done -and that's the great weakness as well.

Have a look at theIE code and then check out the commandID "copy". You may want to have a look at textRange as well - since it's necessary to do the whole shebang.

The following restrictions however apply:

- it will only work in IE4+
- it will only work under Windows
- it is a HUGE security risk
- it is buggy

Neither of which should really come as a surprise.
My personal piece of advise - don't do it.

Posted: Tue Jun 17, 2003 9:21 am
by pama
thanks, i will try to make some codes, but is not so easy
ps.
i'm using WNT and IE, but the pages are on intranet, not internet, so security isn't very important:)