javascipt function to copy highlighted text?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   javascipt function to copy highlighted text?
ruth
CZ Newbie
ruth has been a member for over 19 year's 19 Year Member
Gender: Female
Status: Offline
Joined: Jul 02, 2005
0.00 posts per day
Posts: 1
Points: 50
   
I am javascript illiterate.

This may not be possible, but I don't know so I'm asking the question.

Background:

When you left click, hold and highlight text then right click you get a context menu with copy as one of the options. I have a menu which has a 'designable' right click context menu option, i.e. colors, background, images etc. It contains many of the usual options, back, forward, refresh, print plus some custom things, like link to the home page. You can add to it, for example if you know the function needed, you could place a function for opening a link in a new window, add that text Open in a New Window and when a link is right clicked you would get that as an option on the context menu and when you clicked that it would 'call' the function that 'read the url and implemented the target=_new with that link.

OK, I want to know if there is a way to get the copy and paste options onto that menu. I know how to put the words in, I know how to call the function [I just studied how it was done for the open in a new window option] The problem is, I don't know if there is a function for copying highlighted text. I have searched and found a number of functions, most talk about copying textarea, copying from one text area to another, copying specified text, [ text that is inside a span with an ID] to the clipboard. I even found a script that will allow copyToClipBoard for Moz/Nets and IE - [ Register or login to view links on this board.] but when I tried that one I get a 'meintext' is not defined, whatever that means. I don't know anything about functions, is it possible to create functions for the copy and paste?

Thanks so much for any help. icon_smile.gif

Ruth



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum