This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes enabling dynamic hyperlinks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "enabling dynamic hyperlinks" Watch "enabling dynamic hyperlinks" New topic
Author

enabling dynamic hyperlinks

Adewale Adebusoye
Ranch Hand

Joined: Sep 28, 2005
Posts: 118
Hello.. ive got this email application that uses servlets and jsps.
I would like to make it so that when anyone types in a URL address when he's composing a mail, it automatically becomes a live hyperlink in the page, without me having to write <a href.....blah blah> just like when u type either an email address or a URL in either yahoo or gmail.
I originally posted in the servlets forum, but was redirected here. they told me it could be done in java script, but i dont know how. could someone please help me out and include a code example?
Thanks


"Human beings can alter their lives by altering their state of mind" William James
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can only do this with a rich text area control. Any normal textbox/textarea can not do this.

Eric
Adewale Adebusoye
Ranch Hand

Joined: Sep 28, 2005
Posts: 118
please how can i implement what you have said? ive never used that control before.
Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
What do you think Yahoo or Gmail or Hotmail uses to compose emails. That is a rich text area or a WYSIWYG editor. Search the inernet for code, pretty hard to find a good one that is free.

Eric
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
Look here
Adewale Adebusoye
Ranch Hand

Joined: Sep 28, 2005
Posts: 118
please how can i implement what you have said? ive never used that control before.
Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Did you look at the link that Yuriy posted? You got to experiment to be sucessful in life!

Eric
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: enabling dynamic hyperlinks