This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Get child of an anchor tag forwarded to hyper reference  RSS feed

 
Anuj Kalra
Greenhorn
Posts: 10
Java Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone!
Is there a way to forward the text child of an anchor tag to its hyper reference?

For example, suppose I have an HTML file:



Is there a way to send text 'SomeText' to ABC.jsp so it can be processed?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37180
515
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using JSP to generate that link in the first place, the easiest way is to duplicate it. Or HTML for that matter because you could hard code it. In your example, you'd have the JSP output:

<a href="ABC.jsp?text=SomeText">SomeText</a>

To consume it after submitted, you refer to it as:


If your text has special characters in it, you may need to encode it.
 
Anuj Kalra
Greenhorn
Posts: 10
Java Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:If you are using JSP to generate that link in the first place, the easiest way is to duplicate it. Or HTML for that matter because you could hard code it. In your example, you'd have the JSP output:

<a href="ABC.jsp?text=SomeText">SomeText</a>

To consume it after submitted, you refer to it as:


If your text has special characters in it, you may need to encode it.


Thanks! I'll try this and get back to you!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!