FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Very simple javascript functions...





bladesage
I really need to know how to do these simple system functions with javascript:

-Copy
-Paste
-Cut

Please help. Thanks!!
woja
IE provides a method execCommand which enables you to do Cut, Copy and Paste.

see: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods.asp

I don't think that Firefox or any other browser supprorts this and I've never used it.

I might be able to give more help if you could explain what it is you're trying to achieve.
bladesage
woja wrote:
IE provides a method execCommand which enables you to do Cut, Copy and Paste.

see: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods.asp

I don't think that Firefox or any other browser supprorts this and I've never used it.

I might be able to give more help if you could explain what it is you're trying to achieve.


Well, I basically just want something (preferably javascript) to copy whatever the visitor selects to the clipboard.

Then, I want something to cut whatever the user selects into the clipboard.

Next, I'd like something to perform a select all on whatever (ie: the document, a form field, etc.) the user opens the context menu on (this is for a customized context menu).

Finally, I need something to paste the clipboard's contents into a form field.

I would love this ASAP, and it's a pain trying to figure out how to use the execCommand for what I need.

Thanks!!
Related topics
Programming links, info, and tutorials
javascript function not being seen
AJAX tutorial [2nd part now updated]
Javascript random code generator script needed please
Need help fixing simple javascript ORNeed an actionscripter
Javascript and Dynamic Select Boxes
Using Javascript to Encrypt Data then POST to PHP
What is AJAX?
Where do you stand on using Javascript in websites?
JavaScript Games
i need this simple javascript
Where to put js functions in joomla component?
simple Javascript OOP tutorial
Rollover Buttons or Images
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.