V
visu
Hi this is a question asked in this group two years back..
No answer for this question till date.
now i am in the same situation of the questioner.. to find a solution
for this problem.
Can any one help me in this regard.?
The question is:
----------------------------------------------------------------------------------------------------
Wondering if anyone can tell me if it's possible to have Javascript
select the contents of a div tag with a unique id by clicking
somewhere in the contents of that div tag?
I want to make it as easy as possible for users to copy the contents
of the div tag for pasting in another page. So, instead of having them
use the mouse to drag the selection, which can sometimes be annoying,
I'd like to have them click anywhere within the div tag and have the
text automatically selected, and then they can simply right click and
select 'Copy'.
If this is possible, can anyone give me some advice on how to achieve
it?
As an alternative, if a div tag won't respond to an onClick event
itself, would it be possible to select the contents of that div tag
(assume, for eg, that it has the unique id of "Copy1") by clicking on
a button?
Any help with this would be much appreciated!
Much warmth,
Murray
No answer for this question till date.
now i am in the same situation of the questioner.. to find a solution
for this problem.
Can any one help me in this regard.?
The question is:
----------------------------------------------------------------------------------------------------
Wondering if anyone can tell me if it's possible to have Javascript
select the contents of a div tag with a unique id by clicking
somewhere in the contents of that div tag?
I want to make it as easy as possible for users to copy the contents
of the div tag for pasting in another page. So, instead of having them
use the mouse to drag the selection, which can sometimes be annoying,
I'd like to have them click anywhere within the div tag and have the
text automatically selected, and then they can simply right click and
select 'Copy'.
If this is possible, can anyone give me some advice on how to achieve
it?
As an alternative, if a div tag won't respond to an onClick event
itself, would it be possible to select the contents of that div tag
(assume, for eg, that it has the unique id of "Copy1") by clicking on
a button?
Any help with this would be much appreciated!
Much warmth,
Murray