Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hyperlink in user entered text area

Status
Not open for further replies.

ldpayne

Programmer
Aug 23, 2011
3
US
I am trying to create a text area where the user can enter information which may include a url. If they enter a URL such as I need to convert it to a clickable hyperlink. I am using ASP.NET MVC and jQuery. I understand I cannot use a <textarea> and have read where I need to use a <div> instead, but I am new to this so I need a bit more information. How do I use a <div> to accomplish this? Any help with pointing me in the right direction would be greatly appreciated!
 
I basically need it to work exactly like this web site does! I entered in text which included a URL, and it converted it to a clickable link.
 
textarea is for input. if this is read-only text then you would use a div/span/p to contain the text. you need to parse the text, find the urls and convert them to links. this can be done on the server (.net) or the client (js).

depending on where you do the conversion will depend on which forum is best suited to answer the question.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Ok - thanks Jason. That clears up my confusion about everyone saying to use the <div> instead of <textarea>. I didn't see how that could possibly work!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top