how to select contens of div?

J

Jeff

hi

asp.net 3.5

my webpage have a div. I want the contens of that div to be selected

this div don't have a runat="server", but I can put add runat="server" to it
so that it can be done via c#

Originally this div is hidden on the webpage. When the user clicks on
LinkButton on the page then this div becomes visible. I hoped that at the
same time as this div became visible the text inside the div also became
selected.

any suggestions how to go about doing that?
 
G

Guest

hi

asp.net 3.5

my webpage have a div. I want the contens of that div to be selected

this div don't have a runat="server", but I can put add runat="server" to it
so that it can be done via c#

Originally this div is hidden on the webpage. When the user clicks on
LinkButton on the page then this div becomes visible. I hoped that at the
same time as this div became visible the text inside the div also became
selected.

any suggestions how to go about doing that?

Hi Jeff,

from what I understood, it can be always selected. So, you can add a
javascript and call it onload. A javascript example can be found here
http://bytes.com/groups/javascript/475196-selecting-text-div

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top